Commit f9783cec authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use debug categories

parent abf27cd6
......@@ -14,6 +14,7 @@ include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(GenerateExportHeader)
include(ECMQMLModules)
include(ECMQtDeclareLoggingCategory)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_NO_CAST_FROM_ASCII)
......@@ -61,5 +62,7 @@ if(KF5KHtml_FOUND)
add_subdirectory(classic)
endif()
install(FILES systemsettings.categories DESTINATION ${KDE_INSTALL_CONFDIR})
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -7,6 +7,8 @@ set( systemsettings_SRCS
ToolTips/tooltipmanager.cpp
main.cpp )
ecm_qt_declare_logging_category(systemsettings_SRCS HEADER systemsettings_app_debug.h IDENTIFIER SYSTEMSETTINGS_APP_LOG CATEGORY_NAME org.kde.systemsettings.app)
# port it it's in kdelibs4support
# kde4_add_app_icon( systemsettings_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/categories/preferences-system.png" )
ki18n_wrap_ui( systemsettings_SRCS configDialog.ui )
......
......@@ -19,6 +19,7 @@
#include "SettingsBase.h"
#include "BaseConfig.h"
#include "systemsettings_app_debug.h"
#include <QTimer>
#include <QRadioButton>
......@@ -96,7 +97,7 @@ void SettingsBase::initApplication()
const KService::Ptr entry = modules.at(i);
MenuItem * infoItem = new MenuItem(false, lostFound);
infoItem->setService( entry );
qDebug() << "Added " << entry->name();
qCDebug(SYSTEMSETTINGS_APP_LOG) << "Added " << entry->name();
}
}
......@@ -117,7 +118,7 @@ void SettingsBase::initApplication()
connect(searchText, &KLineEdit::textChanged, controller, &BaseMode::searchChanged);
connect(controller, &BaseMode::viewChanged, this, &SettingsBase::viewChange);
} else {
qWarning() << QStringLiteral("View load error: ") + error;
qCWarning(SYSTEMSETTINGS_APP_LOG) << QStringLiteral("View load error: ") + error;
}
}
searchText->completionObject()->setIgnoreCase( true );
......
......@@ -3,6 +3,8 @@ set(classic_mode_srcs
CategoryList.cpp
)
ecm_qt_declare_logging_category(classic_mode_srcs HEADER systemsettings_classic_debug.h IDENTIFIER SYSTEMSETTINGS_CLASSIC_LOG CATEGORY_NAME org.kde.systemsettings.classic)
ki18n_wrap_ui( classic_mode_srcs configClassic.ui )
add_library(classic_mode MODULE ${classic_mode_srcs})
......
......@@ -18,7 +18,7 @@
*/
#include "CategoryList.h"
#include "systemsettings_classic_debug.h"
#include "MenuItem.h"
#include <QFile>
......@@ -146,7 +146,7 @@ void CategoryList::changeModule( const QModelIndex &newItem )
void CategoryList::slotModuleLinkClicked( const QUrl& moduleName )
{
QModelIndex module = d->itemMap.value( moduleName.url() );
qDebug() << "Link name: " << moduleName.url();
qCDebug(SYSTEMSETTINGS_CLASSIC_LOG) << "Link name: " << moduleName.url();
emit moduleSelected( module );
}
......
org.kde.systemsettings.app (systemsettings app)
org.kde.systemsettings.classic (systemsettings classic)
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