summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 12:57:23 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 12:57:23 (GMT)
commit606e0fc2731100d8f334e2feb1cfb272c25bad53 (patch)
tree40bc5218289ac0ed79da7cafb94d54fe96a7f371
parent61f7e82565fc67c056b76fc0d0d1155bfeef76b9 (diff)
Fix some clazy warningv16.11.80
-rw-r--r--autotests/textutilstest.cpp6
-rw-r--r--autotests/textutilstest.h2
-rw-r--r--src/composer-ng/autotests/richtextcomposertest.cpp2
-rw-r--r--src/composer-ng/richtextcomposeremailquotehighlighter.h1
-rw-r--r--src/inserttabledialog.h1
-rw-r--r--src/tablecellformatdialog.h1
-rw-r--r--src/tableformatdialog.h1
-rw-r--r--src/texteditor/commonwidget/autotests/textgotolinewidgettest.cpp3
-rw-r--r--src/texteditor/commonwidget/autotests/textgotolinewidgettest.h2
-rw-r--r--src/texteditor/commonwidget/textmessageindicator.h1
-rw-r--r--src/texttospeech/texttospeechconfigwidget.cpp2
-rw-r--r--src/texttospeech/texttospeechlanguagecombobox.cpp2
-rw-r--r--tests/slidecontainer_gui.cpp6
13 files changed, 23 insertions, 7 deletions
diff --git a/autotests/textutilstest.cpp b/autotests/textutilstest.cpp
index 29573f3..08a55c9 100644
--- a/autotests/textutilstest.cpp
+++ b/autotests/textutilstest.cpp
@@ -36,6 +36,12 @@ void TextUtilsTest::test_flowText()
QCOMPARE(TextUtils::flowText(originalString, indent, lineLength), quotedString);
}
+TextUtilsTest::TextUtilsTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
void TextUtilsTest::test_flowText_data()
{
QTest::addColumn<QString>("originalString");
diff --git a/autotests/textutilstest.h b/autotests/textutilstest.h
index a13cd08..05556e8 100644
--- a/autotests/textutilstest.h
+++ b/autotests/textutilstest.h
@@ -24,6 +24,8 @@
class TextUtilsTest : public QObject
{
Q_OBJECT
+public:
+ explicit TextUtilsTest(QObject *parent = Q_NULLPTR);
private Q_SLOTS:
void test_flowText_data();
diff --git a/src/composer-ng/autotests/richtextcomposertest.cpp b/src/composer-ng/autotests/richtextcomposertest.cpp
index 7206d53..01c24c9 100644
--- a/src/composer-ng/autotests/richtextcomposertest.cpp
+++ b/src/composer-ng/autotests/richtextcomposertest.cpp
@@ -442,7 +442,7 @@ void RichTextComposerTest::testLoadImage()
QString image2Path = KIconLoader::global()->iconPath(QStringLiteral("arrow-up"), KIconLoader::Small, false);
QImage image1, image2;
QVERIFY(image1.load(image1Path));
- QVERIFY(image2.load(image1Path));
+ QVERIFY(image2.load(image2Path));
edit.setHtml(QStringLiteral("Bla<img src=\"folder-new.png\">Bla"));
diff --git a/src/composer-ng/richtextcomposeremailquotehighlighter.h b/src/composer-ng/richtextcomposeremailquotehighlighter.h
index e8dfe2a..c6022d2 100644
--- a/src/composer-ng/richtextcomposeremailquotehighlighter.h
+++ b/src/composer-ng/richtextcomposeremailquotehighlighter.h
@@ -27,6 +27,7 @@ namespace KPIMTextEdit
class RichTextComposer;
class KPIMTEXTEDIT_EXPORT RichTextComposerEmailQuoteHighlighter : public Sonnet::Highlighter
{
+ Q_OBJECT
public:
/**
diff --git a/src/inserttabledialog.h b/src/inserttabledialog.h
index 65a875d..02088ce 100644
--- a/src/inserttabledialog.h
+++ b/src/inserttabledialog.h
@@ -32,6 +32,7 @@ namespace KPIMTextEdit
class KPIMTEXTEDIT_EXPORT InsertTableDialog : public QDialog
{
+ Q_OBJECT
public:
explicit InsertTableDialog(QWidget *parent);
~InsertTableDialog();
diff --git a/src/tablecellformatdialog.h b/src/tablecellformatdialog.h
index 049f499..7981264 100644
--- a/src/tablecellformatdialog.h
+++ b/src/tablecellformatdialog.h
@@ -32,6 +32,7 @@ namespace KPIMTextEdit
class KPIMTEXTEDIT_EXPORT TableCellFormatDialog : public QDialog
{
+ Q_OBJECT
public:
explicit TableCellFormatDialog(QWidget *parent);
~TableCellFormatDialog();
diff --git a/src/tableformatdialog.h b/src/tableformatdialog.h
index 7ca3e5e..0f847ef 100644
--- a/src/tableformatdialog.h
+++ b/src/tableformatdialog.h
@@ -32,6 +32,7 @@ namespace KPIMTextEdit
class KPIMTEXTEDIT_EXPORT TableFormatDialog : public QDialog
{
+ Q_OBJECT
public:
explicit TableFormatDialog(QWidget *parent);
~TableFormatDialog();
diff --git a/src/texteditor/commonwidget/autotests/textgotolinewidgettest.cpp b/src/texteditor/commonwidget/autotests/textgotolinewidgettest.cpp
index b219cb0..46fa35c 100644
--- a/src/texteditor/commonwidget/autotests/textgotolinewidgettest.cpp
+++ b/src/texteditor/commonwidget/autotests/textgotolinewidgettest.cpp
@@ -27,7 +27,8 @@
#include <QToolButton>
#include <QPushButton>
-TextGoToLineWidgetTest::TextGoToLineWidgetTest()
+TextGoToLineWidgetTest::TextGoToLineWidgetTest(QObject *parent)
+ : QObject(parent)
{
}
diff --git a/src/texteditor/commonwidget/autotests/textgotolinewidgettest.h b/src/texteditor/commonwidget/autotests/textgotolinewidgettest.h
index ed4da7b..3caf3a2 100644
--- a/src/texteditor/commonwidget/autotests/textgotolinewidgettest.h
+++ b/src/texteditor/commonwidget/autotests/textgotolinewidgettest.h
@@ -25,7 +25,7 @@ class TextGoToLineWidgetTest : public QObject
{
Q_OBJECT
public:
- TextGoToLineWidgetTest();
+ explicit TextGoToLineWidgetTest(QObject *parent = Q_NULLPTR);
private Q_SLOTS:
void shouldHaveDefaultValuesOnCreation();
diff --git a/src/texteditor/commonwidget/textmessageindicator.h b/src/texteditor/commonwidget/textmessageindicator.h
index 673355f..ec6cd1c 100644
--- a/src/texteditor/commonwidget/textmessageindicator.h
+++ b/src/texteditor/commonwidget/textmessageindicator.h
@@ -33,6 +33,7 @@ namespace KPIMTextEdit
{
class TextMessageIndicator : public QWidget
{
+ Q_OBJECT
public:
explicit TextMessageIndicator(QWidget *parent = Q_NULLPTR);
diff --git a/src/texttospeech/texttospeechconfigwidget.cpp b/src/texttospeech/texttospeechconfigwidget.cpp
index 7909db6..90af415 100644
--- a/src/texttospeech/texttospeechconfigwidget.cpp
+++ b/src/texttospeech/texttospeechconfigwidget.cpp
@@ -117,7 +117,7 @@ void TextToSpeechConfigWidget::writeConfig()
grp.writeEntry("volume", mVolume->value());
grp.writeEntry("rate", static_cast<double>(mRate->value() / 100));
grp.writeEntry("pitch", static_cast<double>(mPitch->value() / 100));
- grp.writeEntry("localeName", mLanguage->currentData().value<QLocale>().name());
+ grp.writeEntry("localeName", mLanguage->currentData().toLocale().name());
grp.writeEntry("engine", mAvailableEngine->currentData().toString());
grp.writeEntry("voice", mVoice->currentData().toString());
}
diff --git a/src/texttospeech/texttospeechlanguagecombobox.cpp b/src/texttospeech/texttospeechlanguagecombobox.cpp
index d5db351..edc9bb3 100644
--- a/src/texttospeech/texttospeechlanguagecombobox.cpp
+++ b/src/texttospeech/texttospeechlanguagecombobox.cpp
@@ -35,7 +35,7 @@ void TextToSpeechLanguageComboBox::selectLocaleName(const QString &localeName)
{
const int countItem(count());
for (int i = 0; i < countItem; ++i) {
- if (itemData(i).value<QLocale>().name() == localeName) {
+ if (itemData(i).toLocale().name() == localeName) {
setCurrentIndex(i);
break;
}
diff --git a/tests/slidecontainer_gui.cpp b/tests/slidecontainer_gui.cpp
index e46d751..a987567 100644
--- a/tests/slidecontainer_gui.cpp
+++ b/tests/slidecontainer_gui.cpp
@@ -30,9 +30,10 @@ using namespace KPIMTextEdit;
class Window : public QWidget
{
+ Q_OBJECT
public:
- Window()
- : QWidget()
+ explicit Window(QWidget *parent = Q_NULLPTR)
+ : QWidget(parent)
{
SlideContainer *container = new SlideContainer(this);
@@ -64,3 +65,4 @@ int main(int argc, char *argv[])
return app.exec();
}
+#include "slidecontainer_gui.moc"