Commit 6c1cfe15 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent 3267f85e
......@@ -25,12 +25,10 @@
CategoryTypeComboBoxTest::CategoryTypeComboBoxTest(QObject *parent)
: QObject(parent)
{
}
CategoryTypeComboBoxTest::~CategoryTypeComboBoxTest()
{
}
void CategoryTypeComboBoxTest::shouldHaveDefaultValue()
......
......@@ -25,12 +25,10 @@
CategoryWarningTest::CategoryWarningTest(QObject *parent)
: QObject(parent)
{
}
CategoryWarningTest::~CategoryWarningTest()
{
}
void CategoryWarningTest::shouldHaveDefaultValue()
......
......@@ -27,12 +27,10 @@
ConfigureCustomSettingDialogTest::ConfigureCustomSettingDialogTest(QObject *parent)
: QObject(parent)
{
}
ConfigureCustomSettingDialogTest::~ConfigureCustomSettingDialogTest()
{
}
void ConfigureCustomSettingDialogTest::shouldHaveDefaultValue()
......@@ -43,7 +41,6 @@ void ConfigureCustomSettingDialogTest::shouldHaveDefaultValue()
QVERIFY(!buttonBox->button(QDialogButtonBox::Ok)->isEnabled());
ConfigureCustomSettingWidget *widget = dlg.findChild<ConfigureCustomSettingWidget *>(QStringLiteral("customsettingwidget"));
QVERIFY(widget);
}
QTEST_MAIN(ConfigureCustomSettingDialogTest)
......@@ -30,12 +30,10 @@
ConfigureCustomSettingWidgetTest::ConfigureCustomSettingWidgetTest(QObject *parent)
: QObject(parent)
{
}
ConfigureCustomSettingWidgetTest::~ConfigureCustomSettingWidgetTest()
{
}
void ConfigureCustomSettingWidgetTest::shouldHaveDefaultValue()
......
......@@ -29,12 +29,10 @@
CustomDebugSettingsPageTest::CustomDebugSettingsPageTest(QObject *parent)
: QObject(parent)
{
}
CustomDebugSettingsPageTest::~CustomDebugSettingsPageTest()
{
}
void CustomDebugSettingsPageTest::shouldHaveDefaultValue()
......@@ -49,13 +47,11 @@ void CustomDebugSettingsPageTest::shouldHaveDefaultValue()
QCOMPARE(listWidget->selectionMode(), QAbstractItemView::MultiSelection);
QCOMPARE(listWidget->count(), 0);
KListWidgetSearchLine *searchLine = page.findChild<KListWidgetSearchLine *>(QStringLiteral("searchline"));
QVERIFY(searchLine);
QVERIFY(!searchLine->placeholderText().isEmpty());
QCOMPARE(searchLine->listWidget(), listWidget);
QPushButton *addButton = page.findChild<QPushButton *>(QStringLiteral("add_rule"));
QVERIFY(addButton);
QVERIFY(addButton->isEnabled());
......
......@@ -27,12 +27,10 @@
EnvironmentSettingsRulesPageTest::EnvironmentSettingsRulesPageTest(QObject *parent)
: QObject(parent)
{
}
EnvironmentSettingsRulesPageTest::~EnvironmentSettingsRulesPageTest()
{
}
void EnvironmentSettingsRulesPageTest::shouldHaveDefaultValue()
......
......@@ -29,12 +29,10 @@
KDEApplicationDebugSettingPageTest::KDEApplicationDebugSettingPageTest(QObject *parent)
: QObject(parent)
{
}
KDEApplicationDebugSettingPageTest::~KDEApplicationDebugSettingPageTest()
{
}
void KDEApplicationDebugSettingPageTest::shouldHaveDefaultValue()
......
......@@ -25,12 +25,10 @@
KDEApplicationTreeListWidgetTest::KDEApplicationTreeListWidgetTest(QObject *parent) : QObject(parent)
{
}
KDEApplicationTreeListWidgetTest::~KDEApplicationTreeListWidgetTest()
{
}
void KDEApplicationTreeListWidgetTest::shouldHaveDefaultValue()
......
......@@ -35,7 +35,6 @@ KDebugSettingsDialogTest::KDebugSettingsDialogTest(QObject *parent)
KDebugSettingsDialogTest::~KDebugSettingsDialogTest()
{
}
void KDebugSettingsDialogTest::shouldHaveDefaultValue()
......@@ -48,9 +47,9 @@ void KDebugSettingsDialogTest::shouldHaveDefaultValue()
QVERIFY(tab);
for (int i = 0; i < tab->count(); ++i) {
const QString objName = tab->widget(i)->objectName();
const bool hasCorrectName = (objName == QStringLiteral("kdeapplicationsettingspage")) ||
(objName == QStringLiteral("customsettingspage")) ||
(objName == QStringLiteral("environmentsettingsrulespage"));
const bool hasCorrectName = (objName == QStringLiteral("kdeapplicationsettingspage"))
|| (objName == QStringLiteral("customsettingspage"))
|| (objName == QStringLiteral("environmentsettingsrulespage"));
QVERIFY(hasCorrectName);
}
QPushButton *saveAs = buttonBox->findChild<QPushButton *>(QStringLiteral("saveas_button"));
......
......@@ -26,12 +26,10 @@
KDebugSettingUtilTest::KDebugSettingUtilTest(QObject *parent)
: QObject(parent)
{
}
KDebugSettingUtilTest::~KDebugSettingUtilTest()
{
}
void KDebugSettingUtilTest::shouldParseKdeLoggingLine_data()
......
......@@ -41,7 +41,6 @@ private Q_SLOTS:
void shouldReadRenameCategories_data();
void shouldReadRenameCategories();
};
#endif // KDEBUGSETTINGUTILTEST_H
......@@ -29,12 +29,10 @@
LoadCategoriesJobTest::LoadCategoriesJobTest(QObject *parent)
: QObject(parent)
{
}
LoadCategoriesJobTest::~LoadCategoriesJobTest()
{
}
void LoadCategoriesJobTest::shouldHaveDefaultValue()
......@@ -69,8 +67,8 @@ void LoadCategoriesJobTest::shouldReadRules_data()
qtKdeCategories.append(kauthInfo);
QTest::newRow("emptywithlistkdeloggingcategories") << QStringLiteral("rulebeforerulessectionfiles.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List()
<< qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Off, false);
......@@ -115,11 +113,11 @@ void LoadCategoriesJobTest::shouldReadRules_data()
<< qtKdeCategories;
QTest::newRow("oneelementonelinecritical") << QStringLiteral("oneelementonelinecritical.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List()
<< qtKdeCategories;
QTest::newRow("oneelementtwolinecritical") << QStringLiteral("oneelementtwolinecritical.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List()
<< qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Debug, true);
......@@ -129,14 +127,14 @@ void LoadCategoriesJobTest::shouldReadRules_data()
// Duplicate entries
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, true);
QTest::newRow("duplicates") << QStringLiteral("duplicates.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List()
<< qtKdeCategories;
// Duplicate entries with duplicate categories
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, true);
QTest::newRow("duplicates") << QStringLiteral("duplicates.ini") << QStringLiteral("duplicates.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List()
<< qtKdeCategories;
// Test with extract elements
LoggingCategory::List customCategories;
......@@ -148,8 +146,8 @@ void LoadCategoriesJobTest::shouldReadRules_data()
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Debug, true);
QTest::newRow("oneelementdebugandanextract") << QStringLiteral("oneelementdebugandanextract.ini") << QStringLiteral("correct.categories") << false
<< customCategories
<< qtKdeCategories;
<< customCategories
<< qtKdeCategories;
// Test with extract elements
customCategories.clear();
......@@ -159,8 +157,8 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customCategories.append(customTmp);
QTest::newRow("oneelementdebugandanextractfalse") << QStringLiteral("oneelementdebugandanextractfalse.ini") << QStringLiteral("correct.categories") << false
<< customCategories
<< qtKdeCategories;
<< customCategories
<< qtKdeCategories;
//Test without categories
qtKdeCategories.clear();
......@@ -194,8 +192,8 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customTmp.enabled = false;
customCategories.append(customTmp);
QTest::newRow("testwithoutcategorieswarning") << QStringLiteral("testwithoutcategorieswarning.ini") << QString() << false
<< customCategories
<< qtKdeCategories;
<< customCategories
<< qtKdeCategories;
}
void LoadCategoriesJobTest::shouldReadRules()
......
......@@ -25,12 +25,10 @@
LoggingCategoryTest::LoggingCategoryTest(QObject *parent)
: QObject(parent)
{
}
LoggingCategoryTest::~LoggingCategoryTest()
{
}
void LoggingCategoryTest::shouldHaveDefaultValue()
......
......@@ -25,12 +25,10 @@
RenameCategoryTest::RenameCategoryTest(QObject *parent)
: QObject(parent)
{
}
RenameCategoryTest::~RenameCategoryTest()
{
}
void RenameCategoryTest::shouldParseRenameLine_data()
......@@ -64,5 +62,4 @@ void RenameCategoryTest::shouldParseRenameLine()
QCOMPARE(cat.isValid(), valid);
}
QTEST_MAIN(RenameCategoryTest)
......@@ -18,7 +18,6 @@
*/
#include "saverulesjobtest.h"
#include "../src/loadcategoriesjob.h"
#include "../src/saverulesjob.h"
......@@ -45,11 +44,9 @@ void compareFile(const QString &name)
QCOMPARE(proc.exitCode(), 0);
}
SaveRulesJobTest::SaveRulesJobTest(QObject *parent)
: QObject(parent)
{
}
void SaveRulesJobTest::shouldSaveLoadRules_data()
......@@ -73,7 +70,6 @@ void SaveRulesJobTest::shouldSaveLoadRules()
const LoggingCategory::List qtKdeCategories = job.qtKdeCategories();
SaveRulesJob saveJob;
saveJob.setFileName(QLatin1String(KDEBUGSETTINGS_DATA_DIR) + QLatin1Char('/') + filename + QStringLiteral("-generated.ref"));
saveJob.setListCustom(customCategories);
......
......@@ -18,7 +18,6 @@
*/
#ifndef SAVERULESJOBTEST_H
#define SAVERULESJOBTEST_H
......
......@@ -37,7 +37,6 @@ CategoryTypeComboBox::CategoryTypeComboBox(bool customType, QWidget *parent)
CategoryTypeComboBox::~CategoryTypeComboBox()
{
}
void CategoryTypeComboBox::setType(LoggingCategory::LoggingType type)
......@@ -58,7 +57,7 @@ LoggingCategory::LoggingType CategoryTypeComboBox::type() const
bool CategoryTypeComboBox::loggingCategoryIsNotDefault() const
{
return (type() != LoggingCategory::Info);
return type() != LoggingCategory::Info;
}
void CategoryTypeComboBox::setDefaultCategories(const LoggingCategory::LoggingType &defaultCategories)
......
......@@ -32,6 +32,4 @@ CategoryWarning::CategoryWarning(QWidget *parent)
CategoryWarning::~CategoryWarning()
{
}
......@@ -44,12 +44,10 @@ ConfigureCustomSettingDialog::ConfigureCustomSettingDialog(QWidget *parent)
buttonOk->setEnabled(false);
connect(mCustomSettingWidget, &ConfigureCustomSettingWidget::enableButton, buttonOk, &QWidget::setEnabled);
mainLayout->addWidget(buttonBox);
}
ConfigureCustomSettingDialog::~ConfigureCustomSettingDialog()
{
}
void ConfigureCustomSettingDialog::setRule(const QString &rule)
......
......@@ -61,7 +61,6 @@ ConfigureCustomSettingWidget::ConfigureCustomSettingWidget(QWidget *parent)
ConfigureCustomSettingWidget::~ConfigureCustomSettingWidget()
{
}
void ConfigureCustomSettingWidget::slotTextChanged(const QString &text)
......@@ -128,4 +127,3 @@ QString ConfigureCustomSettingWidget::rule() const
}
return ruleStr;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment