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()
loading.readQtLoggingFile();
const LoggingCategory::LoggingType type = convertDebugModeToLoggingType(mDebugMode);
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];
if (mWithoutArguments) {
cat.loggingType = type;
......
......@@ -14,8 +14,8 @@
KDEApplicationTreeListWidgetItem::KDEApplicationTreeListWidgetItem(const QString &category, QTreeWidget *parent)
: QTreeWidgetItem(parent)
, mCategory(category)
, mCategoryTypeCombobox(new CategoryTypeComboBox(false))
{
mCategoryTypeCombobox = new CategoryTypeComboBox(false);
treeWidget()->setItemWidget(this, CategoryType, mCategoryTypeCombobox);
}
......
......@@ -29,7 +29,7 @@ public:
private:
QString mCategory;
CategoryTypeComboBox *mCategoryTypeCombobox = nullptr;
CategoryTypeComboBox *const mCategoryTypeCombobox;
};
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