Commit acffcd98 authored by Rex Dieter's avatar Rex Dieter

support loading qtlogging.ini from QLibraryInfo::DataPath too

See also:
https://codereview.qt-project.org/#/c/114805/4

Differential Revision: 4407
parent 2198c9f0
......@@ -33,6 +33,7 @@
#include <QFileDialog>
#include <QDialogButtonBox>
#include <QLibraryInfo>
#include <QTabWidget>
#include <QVBoxLayout>
#include <QPushButton>
......@@ -117,7 +118,12 @@ void KDebugSettingsDialog::saveConfig()
void KDebugSettingsDialog::readQtLoggingFile()
{
const QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("QtProject/qtlogging.ini"));
readCategoriesFiles(envPath);
if (!envPath.isEmpty()) {
readCategoriesFiles(envPath);
} else {
const QString dataPath = QDir(QLibraryInfo::location(QLibraryInfo::DataPath)).absoluteFilePath(QStringLiteral("qtlogging.ini"));
readCategoriesFiles(dataPath);
}
}
void KDebugSettingsDialog::readCategoriesFiles(const QString &path)
......
Markdown is supported
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