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
Education
Kalzium
Commits
14b42195
Commit
14b42195
authored
Jan 05, 2022
by
Laurent Montel
😁
Browse files
Add debug categories
parent
2b2ed3fa
Pipeline
#118884
passed with stage
in 53 seconds
Changes
26
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
14b42195
...
...
@@ -25,6 +25,7 @@ include(ECMInstallIcons)
include
(
ECMMarkNonGuiExecutable
)
include
(
CheckIncludeFiles
)
include
(
ECMSetupVersion
)
include
(
ECMQtDeclareLoggingCategory
)
find_package
(
Gettext REQUIRED
)
find_package
(
PythonInterp REQUIRED
)
...
...
@@ -143,4 +144,10 @@ if (KF5DocTools_FOUND)
endif
()
install
(
FILES org.kde.kalzium.appdata.xml DESTINATION
${
KDE_INSTALL_METAINFODIR
}
)
ecm_qt_install_logging_categories
(
EXPORT KALZIUM
FILE kalzium.categories
DESTINATION
${
KDE_INSTALL_LOGGINGCATEGORIESDIR
}
)
feature_summary
(
WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES
)
src/CMakeLists.txt
View file @
14b42195
...
...
@@ -43,6 +43,8 @@ if (HAVE_OPENBABEL)
endif
(
EIGEN3_FOUND AND AvogadroLibs_FOUND
)
endif
(
HAVE_OPENBABEL
)
## Kalzium calculator files
set
(
kalziumtools_SRCS
${
kalziumtools_SRCS
}
...
...
@@ -68,6 +70,7 @@ ki18n_wrap_ui(kalziumtools_SRCS
# calculator/massCalculator.ui
)
ecm_qt_declare_logging_category
(
kalziumtools_SRCS HEADER kalzium_debug.h IDENTIFIER KALZIUM_LOG CATEGORY_NAME org.kde.kalzium DESCRIPTION
"Kalzium"
EXPORT KALZIUML
)
set
(
kalzium_SRCS
${
kalziumtools_SRCS
}
detailedgraphicaloverview.cpp
...
...
src/calculator/calculator.cpp
View file @
14b42195
...
...
@@ -6,7 +6,7 @@
#include "calculator.h"
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QDialog>
#include <QDialogButtonBox>
#include <QIcon>
...
...
@@ -91,7 +91,7 @@ void calculator::slotItemSelection(QTreeWidgetItem *item)
}
//DEBUG
qDebug
()
<<
"Item clicked: "
<<
item
->
text
(
0
);
q
C
Debug
(
KALZIUM_LOG
)
<<
"Item clicked: "
<<
item
->
text
(
0
);
QString
s
=
item
->
text
(
0
);
...
...
src/calculator/concCalculator.cpp
View file @
14b42195
...
...
@@ -6,7 +6,7 @@
#include "concCalculator.h"
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <KLocalizedString>
#include <KUnitConversion/Converter>
...
...
src/calculator/concCalculator.h
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#ifndef CONCCALCULATOR_H
#define CONCCALCULATOR_H
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <KUnitConversion/UnitCategory>
...
...
src/calculator/gasCalculator.h
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#ifndef GASCALCULATOR_H
#define GASCALCULATOR_H
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <KUnitConversion/Converter>
#include <KUnitConversion/UnitCategory>
...
...
src/calculator/nuclearCalculator.h
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#ifndef NUCLEARCALCULATOR_H
#define NUCLEARCALCULATOR_H
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <KUnitConversion/UnitCategory>
#include <KUnitConversion/Converter>
...
...
src/calculator/titrationCalculator.h
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#ifndef TITRATIONCALCULATOR_H
#define TITRATIONCALCULATOR_H
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QString>
#include <QStringList>
...
...
src/detailedgraphicaloverview.cpp
View file @
14b42195
...
...
@@ -10,7 +10,7 @@
#include <KLocalizedString>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QFile>
#include <QFileInfo>
#include <QFontDatabase>
...
...
src/elementdataviewer.cpp
View file @
14b42195
...
...
@@ -10,7 +10,7 @@
#include "prefs.h"
//Qt-Includes
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QDialogButtonBox>
#include <QKeyEvent>
#include <QPen>
...
...
@@ -141,14 +141,14 @@ void ElementDataViewer::swapXYAxis()
void
ElementDataViewer
::
setLimits
()
{
qDebug
()
<<
"ElementDataViewer::setLimits()"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ElementDataViewer::setLimits()"
;
double
x1
=
0.0
,
x2
=
0.0
,
y1
=
0.0
,
y2
=
0.0
;
getMinMax
(
x1
,
x2
,
m_xData
);
getMinMax
(
y1
,
y2
,
m_yData
);
qDebug
()
<<
x1
<<
" :: "
<<
x2
<<
" ----- "
<<
y1
<<
" :: "
<<
y2
;
q
C
Debug
(
KALZIUM_LOG
)
<<
x1
<<
" :: "
<<
x2
<<
" ----- "
<<
y1
<<
" :: "
<<
y2
;
//JH: add some padding to show all points
double
dx
=
0.05
*
(
x2
-
x1
);
...
...
@@ -178,7 +178,7 @@ void ElementDataViewer::getMinMax(double& min, double& max, AxisData * data)
double
minValue
=
data
->
value
(
firstElement
);
double
maxValue
=
data
->
value
(
firstElement
);
qDebug
()
<<
"Taking elements from "
<<
firstElement
<<
" to "
<<
lastElement
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"Taking elements from "
<<
firstElement
<<
" to "
<<
lastElement
;
for
(
int
_currentVal
=
firstElement
;
_currentVal
<=
lastElement
;
++
_currentVal
)
{
//go over all selected elements
double
v
=
data
->
value
(
_currentVal
);
...
...
@@ -191,7 +191,7 @@ void ElementDataViewer::getMinMax(double& min, double& max, AxisData * data)
}
}
qDebug
()
<<
"The value are ]"
<<
minValue
<<
" , "
<<
maxValue
<<
"[."
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"The value are ]"
<<
minValue
<<
" , "
<<
maxValue
<<
"[."
;
min
=
minValue
;
max
=
maxValue
;
...
...
src/exportdialog.cpp
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#include "kalziumutils.h"
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QDialog>
#include <QDialogButtonBox>
#include <QFont>
...
...
@@ -76,7 +76,7 @@ PropertyListEntry::~PropertyListEntry()
ExportDialog
::
ExportDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
),
m_outputStream
(
nullptr
)
{
qDebug
()
<<
"ExportDialog::ExportDialog"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ExportDialog::ExportDialog"
;
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
...
...
@@ -87,29 +87,29 @@ ExportDialog::ExportDialog(QWidget * parent)
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
ExportDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
ExportDialog
::
reject
);
mainLayout
->
addWidget
(
buttonBox
);
qDebug
()
<<
"ExportDialog: setButtons"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ExportDialog: setButtons"
;
ui
.
setupUi
(
mainWidget
);
qDebug
()
<<
"ExportDialog: ui.setupUi(mainWidget)"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ExportDialog: ui.setupUi(mainWidget)"
;
KGuiItem
::
assign
(
user1Button
,
KGuiItem
(
i18n
(
"OK"
)));
qDebug
()
<<
"ExportDialog: setButtonGuiItem(User1, KGuiItem(i18n(
\"
OK
\"
)));"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ExportDialog: setButtonGuiItem(User1, KGuiItem(i18n(
\"
OK
\"
)));"
;
ui
.
targetFile
->
setMode
(
KFile
::
File
|
KFile
::
Directory
|
KFile
::
LocalOnly
);
qDebug
()
<<
"ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);"
;
setWindowTitle
(
i18nc
(
"@title:window"
,
"Export Chemical Data"
));
qDebug
()
<<
"ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);"
;
populateElementList
();
qDebug
()
<<
"ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);"
;
ui
.
formatList
->
addItem
(
QStringLiteral
(
".html (formatted html document)"
),
"html"
);
ui
.
formatList
->
addItem
(
QStringLiteral
(
".xml (raw element data)"
),
"xml"
);
ui
.
formatList
->
addItem
(
QStringLiteral
(
".csv (comma-separated data)"
),
"csv"
);
qDebug
()
<<
"ui.formatList->addItem(...);"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"ui.formatList->addItem(...);"
;
connect
(
user1Button
,
&
QPushButton
::
clicked
,
this
,
&
ExportDialog
::
slotOkClicked
);
qDebug
()
<<
"connect(user1Button, SIGNAL(clicked()), this, SLOT(slotOkClicked()));"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"connect(user1Button, SIGNAL(clicked()), this, SLOT(slotOkClicked()));"
;
connect
(
buttonBox
,
&
QDialogButtonBox
::
helpRequested
,
this
,
&
ExportDialog
::
slotHelpRequested
);
qDebug
()
<<
"KHelpClient::invokeHelp(QString(),
\"
kalzium
\"
);"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"KHelpClient::invokeHelp(QString(),
\"
kalzium
\"
);"
;
}
ExportDialog
::~
ExportDialog
()
...
...
src/gradientwidget_impl.cpp
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#include <KLocalizedString>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QIcon>
#include <QTimer>
...
...
src/isotopetable/isotopetabledialog.cpp
View file @
14b42195
...
...
@@ -13,7 +13,7 @@
#include <isotope.h>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
...
...
src/kalzium.cpp
View file @
14b42195
...
...
@@ -441,7 +441,7 @@ void Kalzium::slotSwitchtoNumeration(int index)
void
Kalzium
::
slotSwitchtoLookGradient
(
int
which
)
{
qDebug
()
<<
"slotSwitchtoLookGradient Kalzium"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"slotSwitchtoLookGradient Kalzium"
;
KalziumElementProperty
::
instance
()
->
setGradient
(
which
);
...
...
@@ -461,7 +461,7 @@ void Kalzium::slotSwitchtoLookGradient(int which)
void
Kalzium
::
slotSwitchtoLookScheme
(
int
which
)
{
qDebug
()
<<
"slotSwitchtoLookScheme Kalzium"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"slotSwitchtoLookScheme Kalzium"
;
KalziumElementProperty
::
instance
()
->
setScheme
(
which
);
...
...
@@ -558,7 +558,7 @@ void Kalzium::elementHover(int num)
e
->
dataAsString
(
ChemicalDataObject
::
name
),
e
->
dataAsString
(
ChemicalDataObject
::
atomicNumber
),
e
->
dataAsString
(
ChemicalDataObject
::
mass
)));
qDebug
()
<<
"change item in status bar"
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"change item in status bar"
;
m_detailWidget
->
setElement
(
num
);
}
...
...
src/kalziumdataobject.cpp
View file @
14b42195
...
...
@@ -12,7 +12,7 @@
#include <spectrumparser.h>
#include <QCoreApplication>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QFile>
#include <QFileInfo>
#include <QGlobalStatic>
...
...
src/kalziumgradienttype.cpp
View file @
14b42195
...
...
@@ -10,7 +10,7 @@
#include "prefs.h"
#include "kalziumdataobject.h"
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QVariant>
#include <KLocalizedString>
...
...
src/kalziumschemetype.cpp
View file @
14b42195
...
...
@@ -17,7 +17,7 @@
#endif
#include <QBrush>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QStandardPaths>
#include <KLocalizedString>
...
...
@@ -449,7 +449,7 @@ QList<legendPair> KalziumColorSchemeType::legendItems() const
//X {
//X QString crystal = KalziumDataObject::instance()->element(el)->dataAsString(ChemicalDataObject::crystalstructure);
//X
//X qDebug() << "crystal is " << crystal;
//X q
C
Debug(
KALZIUM_LOG
) << "crystal is " << crystal;
//X
//X static QString resourcepath;
//X if (resourcepath.isEmpty()) {
...
...
@@ -481,11 +481,11 @@ QList<legendPair> KalziumColorSchemeType::legendItems() const
//X
//X QBrush ret;
//X if (!filename.isEmpty()) {
//X qDebug() << el << ": FILENAME is not EMPTY... " << filename;
//X q
C
Debug(
KALZIUM_LOG
) << el << ": FILENAME is not EMPTY... " << filename;
//X QPixmap pixmap(resourcepath + filename);
//X ret = QBrush(pixmap.scaled(elrect.size(), Qt::KeepAspectRatio));
//X } else {
//X qDebug() << el << ": FILENAME EMPTY... " << filename;
//X q
C
Debug(
KALZIUM_LOG
) << el << ": FILENAME EMPTY... " << filename;
//X ret.setColor(Qt::gray);
//X }
//X
...
...
src/kalziumutils.cpp
View file @
14b42195
...
...
@@ -7,7 +7,7 @@
#include <config-kalzium.h>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QFont>
#include <QPainter>
#include <QRect>
...
...
src/kdeeduglossary.cpp
View file @
14b42195
...
...
@@ -13,7 +13,7 @@
#include <KTreeWidgetSearchLine>
#include <QKeyEvent>
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QDialogButtonBox>
#include <QDomDocument>
#include <QEvent>
...
...
@@ -148,7 +148,7 @@ bool Glossary::loadLayout(QDomDocument &Document, const QUrl &url)
QFile
layoutFile
(
url
.
path
());
if
(
!
layoutFile
.
exists
())
{
qDebug
()
<<
"no such file: "
<<
layoutFile
.
fileName
();
q
C
Debug
(
KALZIUM_LOG
)
<<
"no such file: "
<<
layoutFile
.
fileName
();
return
false
;
}
...
...
@@ -158,7 +158,7 @@ bool Glossary::loadLayout(QDomDocument &Document, const QUrl &url)
// check if document is well-formed
if
(
!
Document
.
setContent
(
&
layoutFile
))
{
qDebug
()
<<
"wrong xml of "
<<
layoutFile
.
fileName
();
q
C
Debug
(
KALZIUM_LOG
)
<<
"wrong xml of "
<<
layoutFile
.
fileName
();
layoutFile
.
close
();
return
false
;
}
...
...
src/legendwidget.cpp
View file @
14b42195
...
...
@@ -8,7 +8,7 @@
#include "prefs.h"
#include
<QD
ebug
>
#include
"kalzium_d
ebug
.h"
#include <QGridLayout>
#include <QHBoxLayout>
...
...
@@ -27,7 +27,7 @@ LegendWidget::~LegendWidget()
void
LegendWidget
::
setDockArea
(
Qt
::
DockWidgetArea
newDockArea
)
{
qDebug
()
<<
"dock Area changed"
<<
newDockArea
;
q
C
Debug
(
KALZIUM_LOG
)
<<
"dock Area changed"
<<
newDockArea
;
m_dockArea
=
newDockArea
;
updateContent
();
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
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