Commit 370cdc2d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 39e556b0
Pipeline #70017 passed with stage
in 5 minutes and 41 seconds
...@@ -42,7 +42,7 @@ bool ChangeDebugModeJob::start() ...@@ -42,7 +42,7 @@ bool ChangeDebugModeJob::start()
loading.readQtLoggingFile(); loading.readQtLoggingFile();
const LoggingCategory::LoggingType type = convertDebugModeToLoggingType(mDebugMode); const LoggingCategory::LoggingType type = convertDebugModeToLoggingType(mDebugMode);
LoggingCategory::List customCategories = loading.customCategories(); LoggingCategory::List customCategories = loading.customCategories();
for (int i = 0; i < customCategories.count(); ++i) { for (int i = 0, total = customCategories.count(); i < total; ++i) {
LoggingCategory cat = customCategories[i]; LoggingCategory cat = customCategories[i];
if (mWithoutArguments) { if (mWithoutArguments) {
cat.loggingType = type; cat.loggingType = type;
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
KDEApplicationTreeListWidgetItem::KDEApplicationTreeListWidgetItem(const QString &category, QTreeWidget *parent) KDEApplicationTreeListWidgetItem::KDEApplicationTreeListWidgetItem(const QString &category, QTreeWidget *parent)
: QTreeWidgetItem(parent) : QTreeWidgetItem(parent)
, mCategory(category) , mCategory(category)
, mCategoryTypeCombobox(new CategoryTypeComboBox(false))
{ {
mCategoryTypeCombobox = new CategoryTypeComboBox(false);
treeWidget()->setItemWidget(this, CategoryType, mCategoryTypeCombobox); treeWidget()->setItemWidget(this, CategoryType, mCategoryTypeCombobox);
} }
......
...@@ -29,7 +29,7 @@ public: ...@@ -29,7 +29,7 @@ public:
private: private:
QString mCategory; QString mCategory;
CategoryTypeComboBox *mCategoryTypeCombobox = nullptr; CategoryTypeComboBox *const mCategoryTypeCombobox;
}; };
class LIBKDEBUGSETTINGS_EXPORT_TEST_EXPORT KDEApplicationTreeListWidget : public QTreeWidget class LIBKDEBUGSETTINGS_EXPORT_TEST_EXPORT KDEApplicationTreeListWidget : public QTreeWidget
......
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