Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KDebugSettings
Commits
2de65b8f
Commit
2de65b8f
authored
Feb 27, 2015
by
Laurent Montel
😁
Browse files
Fix typo. Rename data file as kde.categories etc.
Thanks David for review
parent
299b6ed5
Changes
6
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2de65b8f
...
...
@@ -34,6 +34,6 @@ add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_subdirectory
(
src
)
add_subdirectory
(
autotests
)
install
(
FILES data/
q
de
bug.area
s DESTINATION
${
KDE_INSTALL_CONFDIR
}
)
install
(
FILES data/
k
de
.categorie
s DESTINATION
${
KDE_INSTALL_CONFDIR
}
)
feature_summary
(
WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES
)
autotests/kdeapplicationdebugsettingpagetest.cpp
View file @
2de65b8f
...
...
@@ -51,6 +51,7 @@ void KDeApplicationDebugSettingPageTest::shouldHaveDefaultValue()
KListWidgetSearchLine
*
searchLine
=
page
.
findChild
<
KListWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
QVERIFY
(
searchLine
);
QVERIFY
(
searchLine
->
text
().
isEmpty
());
}
QTEST_MAIN
(
KDeApplicationDebugSettingPageTest
)
autotests/kdebugsettingutiltest.cpp
View file @
2de65b8f
...
...
@@ -33,7 +33,7 @@ KDebugSettingUtilTest::~KDebugSettingUtilTest()
}
void
KDebugSettingUtilTest
::
shouldParseKdeLogginLine_data
()
void
KDebugSettingUtilTest
::
shouldParseKdeLoggin
g
Line_data
()
{
QTest
::
addColumn
<
QString
>
(
"input"
);
QTest
::
addColumn
<
QString
>
(
"description"
);
...
...
@@ -48,7 +48,7 @@ void KDebugSettingUtilTest::shouldParseKdeLogginLine_data()
QTest
::
newRow
(
"badline"
)
<<
QStringLiteral
(
"log"
)
<<
QString
()
<<
QString
()
<<
QString
()
<<
false
;
}
void
KDebugSettingUtilTest
::
shouldParseKdeLogginLine
()
void
KDebugSettingUtilTest
::
shouldParseKdeLoggin
g
Line
()
{
QFETCH
(
QString
,
input
);
QFETCH
(
QString
,
description
);
...
...
@@ -64,7 +64,7 @@ void KDebugSettingUtilTest::shouldParseKdeLogginLine()
QCOMPARE
(
cat
,
result
);
}
void
KDebugSettingUtilTest
::
shouldParseQtLogginLine_data
()
void
KDebugSettingUtilTest
::
shouldParseQtLoggin
g
Line_data
()
{
QTest
::
addColumn
<
QString
>
(
"input"
);
QTest
::
addColumn
<
QString
>
(
"description"
);
...
...
@@ -88,7 +88,7 @@ void KDebugSettingUtilTest::shouldParseQtLogginLine_data()
QTest
::
newRow
(
"invalidWithoutEnabledDisabled"
)
<<
QStringLiteral
(
"dd="
)
<<
QString
()
<<
QString
()
<<
QString
()
<<
false
;
}
void
KDebugSettingUtilTest
::
shouldParseQtLogginLine
()
void
KDebugSettingUtilTest
::
shouldParseQtLoggin
g
Line
()
{
QFETCH
(
QString
,
input
);
QFETCH
(
QString
,
description
);
...
...
autotests/kdebugsettingutiltest.h
View file @
2de65b8f
...
...
@@ -30,11 +30,11 @@ public:
explicit
KDebugSettingUtilTest
(
QObject
*
parent
=
0
);
~
KDebugSettingUtilTest
();
private
Q_SLOTS
:
void
shouldParseKdeLogginLine_data
();
void
shouldParseKdeLogginLine
();
void
shouldParseKdeLoggin
g
Line_data
();
void
shouldParseKdeLoggin
g
Line
();
void
shouldParseQtLogginLine_data
();
void
shouldParseQtLogginLine
();
void
shouldParseQtLoggin
g
Line_data
();
void
shouldParseQtLoggin
g
Line
();
};
#endif // KDEBUGSETTINGUTILTEST_H
data/
q
de
bug.area
s
→
data/
k
de
.categorie
s
View file @
2de65b8f
# Format : logname<
tab
>description
# Format : logname<
space
>description
# kdepim
log_sieveeditor kdepim (sieveeditor)
...
...
src/kdebugsettingsdialog.cpp
View file @
2de65b8f
...
...
@@ -48,7 +48,7 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
mCustomSettingsPage
=
new
CustomDebugSettingsPage
(
this
);
mCustomSettingsPage
->
setObjectName
(
QStringLiteral
(
"customsettingspage"
));
mTabWidget
->
addTab
(
mKdeApplicationSettingsPage
,
i18n
(
"KDE Application"
));
mTabWidget
->
addTab
(
mCustomSettingsPage
,
i18n
(
"Custom"
));
mTabWidget
->
addTab
(
mCustomSettingsPage
,
i18n
(
"Custom
Rules
"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
buttonBox
->
setObjectName
(
QStringLiteral
(
"buttonbox"
));
...
...
@@ -83,7 +83,7 @@ void KDebugSettingsDialog::saveConfig()
void
KDebugSettingsDialog
::
readCategoriesFiles
()
{
// KDE debug categories area
const
QString
confAreasFile
=
QStandardPaths
::
locate
(
QStandardPaths
::
ConfigLocation
,
QLatin1Literal
(
"
q
de
bug.area
s"
));
const
QString
confAreasFile
=
QStandardPaths
::
locate
(
QStandardPaths
::
ConfigLocation
,
QLatin1Literal
(
"
k
de
.categorie
s"
));
Category
::
List
categories
=
KDebugSettingsUtil
::
readLoggingCategories
(
confAreasFile
);
// qt logging.ini
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment