diff --git a/.arcconfig b/.arcconfig
--- a/.arcconfig
+++ b/.arcconfig
@@ -1,3 +1,3 @@
{
- "phabricator.uri" : "https://phabricator.kde.org/"
-}
+ "phabricator.uri" : "https://phabricator.kde.org/source/kalzium/"
+}
\ No newline at end of file
diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user
new file mode 100644
--- /dev/null
+++ b/CMakeLists.txt.user
@@ -0,0 +1,844 @@
+
+
+
+
+
+ EnvironmentId
+ {61df658e-038c-4aca-b0f2-e282ca25784f}
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ true
+
+ Cpp
+
+ CppGlobal
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ UTF-8
+ false
+ 4
+ false
+ 80
+ true
+ true
+ 1
+ true
+ false
+ 0
+ true
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ false
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+ true
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Desktop
+ Desktop
+ {c6bba980-b2c6-4c37-8d83-12fc39c66dd5}
+ 0
+ 0
+ 0
+
+
+ /home/carlos/build-kalzium-Desktop-Default
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Default
+ Default
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=Debug
+
+ /home/carlos/build-kalzium-Desktop-Debug
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Debug
+ Debug
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=Release
+
+ /home/carlos/build-kalzium-Desktop-Release
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Release
+ Release
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+
+ /home/carlos/build-kalzium-Desktop-Release with Debug Information
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Release with Debug Information
+ Release with Debug Information
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=MinSizeRel
+
+ /home/carlos/build-kalzium-Desktop-Minimum Size Release
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Minimum Size Release
+ Minimum Size Release
+ CMakeProjectManager.CMakeBuildConfiguration
+
+ 5
+
+
+ 0
+ Deploy
+
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+ Deploy Configuration
+
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+
+
+ /home/carlos/build-kalzium-Desktop-Default/src
+ 2
+
+ kalzium
+
+ CMakeProjectManager.CMakeRunConfiguration.kalzium
+/home/carlos/kalzium/src/
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+
+
+ /home/carlos/build-kalzium-Desktop-Default/libscience/tests
+ 2
+
+ elementparsertest
+
+ CMakeProjectManager.CMakeRunConfiguration.elementparsertest
+/home/carlos/kalzium/libscience/tests/
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+
+
+ /home/carlos/build-kalzium-Desktop-Default/libscience/tests
+ 2
+
+ spectrumtest
+
+ CMakeProjectManager.CMakeRunConfiguration.spectrumtest
+/home/carlos/kalzium/libscience/tests/
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+
+
+ /home/carlos/build-kalzium-Desktop-Default/libscience/tests
+ 2
+
+ isotopeparsertest
+
+ CMakeProjectManager.CMakeRunConfiguration.isotopeparsertest
+/home/carlos/kalzium/libscience/tests/
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+ 4
+
+
+
+ ProjectExplorer.Project.Target.1
+
+ Qt 5.11.1 (System)
+ Qt 5.11.1 (System)
+ {346083e1-5e49-4bf9-81af-821675576c97}
+ 0
+ 0
+ 0
+
+
+ /home/carlos/build-kalzium-Qt_5_11_1_System-Default
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Default
+ Default
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=Debug
+
+ /home/carlos/build-kalzium-Qt_5_11_1_System-Debug
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Debug
+ Debug
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=Release
+
+ /home/carlos/build-kalzium-Qt_5_11_1_System-Release
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Release
+ Release
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+
+ /home/carlos/build-kalzium-Qt_5_11_1_System-Release with Debug Information
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Release with Debug Information
+ Release with Debug Information
+ CMakeProjectManager.CMakeBuildConfiguration
+
+
+
+ CMAKE_BUILD_TYPE:STRING=MinSizeRel
+
+ /home/carlos/build-kalzium-Qt_5_11_1_System-Minimum Size Release
+
+
+
+
+ all
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+
+
+ clean
+
+ true
+ CMake Build
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Minimum Size Release
+ Minimum Size Release
+ CMakeProjectManager.CMakeBuildConfiguration
+
+ 5
+
+
+ 0
+ Deploy
+
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+ Deploy Configuration
+
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+ 2
+
+
+
+
+
+ Custom Executable
+
+ ProjectExplorer.CustomExecutableRunConfiguration
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 2
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 18
+
+
+ Version
+ 18
+
+
diff --git a/compoundviewer/kalziumglwidget.cpp b/compoundviewer/kalziumglwidget.cpp
--- a/compoundviewer/kalziumglwidget.cpp
+++ b/compoundviewer/kalziumglwidget.cpp
@@ -34,7 +34,7 @@
{
// work around a bug in OpenBabel: the chemical data files parsing
// is dependent on the LC_NUMERIC locale.
- m_lc_numeric = QByteArray(setlocale(LC_NUMERIC, 0));
+ m_lc_numeric = QByteArray(setlocale(LC_NUMERIC, nullptr));
setlocale(LC_NUMERIC, "C");
// Prevent What's this from intercepting right mouse clicks
diff --git a/libscience/elementparser.cpp b/libscience/elementparser.cpp
--- a/libscience/elementparser.cpp
+++ b/libscience/elementparser.cpp
@@ -25,7 +25,7 @@
public:
Private()
: currentUnit(KUnitConversion::NoUnit),
- currentElement(0),
+ currentElement(nullptr),
inElement(false),
inName(false),
inMass(false),
@@ -217,7 +217,7 @@
delete d->currentElement;
}
- d->currentElement = 0;
+ d->currentElement = nullptr;
d->inElement = false;
} else if (localName == "scalar" || localName == "label" || localName == "array") {
d->currentDataObject.setUnit(d->currentUnit);
diff --git a/libscience/isotopeparser.cpp b/libscience/isotopeparser.cpp
--- a/libscience/isotopeparser.cpp
+++ b/libscience/isotopeparser.cpp
@@ -26,7 +26,7 @@
: currentUnit(KUnitConversion::NoUnit),
currentErrorValue(QVariant()),
currentElementSymbol(QString()),
- currentIsotope(0),
+ currentIsotope(nullptr),
inIsotope(false),
inElement(false),
inAtomicNumber(false),
@@ -167,7 +167,7 @@
if (localName == "isotope") {
d->isotopes.append(d->currentIsotope);
- d->currentIsotope = 0;
+ d->currentIsotope = nullptr;
d->inIsotope = false;
} else if (localName == "isotopeList") { //a new list of isotopes start...
d->inElement = false;
diff --git a/libscience/moleculeparser.cpp b/libscience/moleculeparser.cpp
--- a/libscience/moleculeparser.cpp
+++ b/libscience/moleculeparser.cpp
@@ -40,7 +40,7 @@
}
}
- return 0;
+ return nullptr;
}
void ElementCountMap::add(ElementCountMap &_map)
@@ -289,7 +289,7 @@
qDebug() << "no such element!: " << _name;
- return NULL;
+ return nullptr;
}
QString MoleculeParser::expandFormula( const QString& _shortString)
diff --git a/libscience/psetables.cpp b/libscience/psetables.cpp
--- a/libscience/psetables.cpp
+++ b/libscience/psetables.cpp
@@ -56,7 +56,7 @@
pseTable* pseTables::getTabletype(const int tableType)
{
if ((tableType < 0) || (tableType >= m_tables.count())) {
- return 0;
+ return nullptr;
}
return m_tables.at(tableType);
@@ -69,7 +69,7 @@
return m_tables.at(i);
}
}
- return 0;
+ return nullptr;
}
pseTable::pseTable()
@@ -82,7 +82,7 @@
pseTable *pseTable::init()
{
- return 0;
+ return nullptr;
}
QString pseTable::name() const
diff --git a/libscience/spectrumparser.cpp b/libscience/spectrumparser.cpp
--- a/libscience/spectrumparser.cpp
+++ b/libscience/spectrumparser.cpp
@@ -23,7 +23,7 @@
{
public:
Private()
- : currentSpectrum(0),
+ : currentSpectrum(nullptr),
inMetadata_(false),
inSpectrum_(false),
inSpectrumList_(false),
@@ -100,14 +100,14 @@
d->spectra.append(d->currentSpectrum);
- d->currentSpectrum = 0;
+ d->currentSpectrum = nullptr;
d->inSpectrum_ = false;
} else if (localName == "peakList") {
d->inSpectrumList_ = false;
} else if (localName == "peak") {
//X qDebug() << "in 'peak'" << " with this data: " << d->currentPeak->intensity << " (intesity)" ;
d->currentSpectrum->addPeak(d->currentPeak);
- d->currentPeak = 0;
+ d->currentPeak = nullptr;
d->inPeak_ = false;
}
return true;
diff --git a/src/detailedgraphicaloverview.cpp b/src/detailedgraphicaloverview.cpp
--- a/src/detailedgraphicaloverview.cpp
+++ b/src/detailedgraphicaloverview.cpp
@@ -32,7 +32,7 @@
#include "prefs.h"
DetailedGraphicalOverview::DetailedGraphicalOverview(QWidget *parent)
- : QWidget(parent), m_element(0)
+ : QWidget(parent), m_element(nullptr)
{
setAttribute(Qt::WA_NoBackground, true);
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -449,7 +449,7 @@
void DetailedInfoDlg::createContent()
{
- KPageWidgetItem *item = 0;
+ KPageWidgetItem *item = nullptr;
// Removed the overview Tab, because its an Dockwidget and dosn't show much information.
// overview tab
diff --git a/src/elementdataviewer.cpp b/src/elementdataviewer.cpp
--- a/src/elementdataviewer.cpp
+++ b/src/elementdataviewer.cpp
@@ -361,8 +361,8 @@
*/
int whichType = ui.comboElementType->currentIndex();
- KPlotObject* dataPointGreen = 0;
- KPlotObject* dataPointRed = 0;
+ KPlotObject* dataPointGreen = nullptr;
+ KPlotObject* dataPointRed = nullptr;
double av_x = 0.0;
double max_x = m_xData->value(from);
diff --git a/src/exportdialog.cpp b/src/exportdialog.cpp
--- a/src/exportdialog.cpp
+++ b/src/exportdialog.cpp
@@ -74,7 +74,7 @@
}
ExportDialog::ExportDialog(QWidget * parent)
- : KDialog(parent),m_outputStream(0)
+ : KDialog(parent),m_outputStream(nullptr)
{
qDebug() << "ExportDialog::ExportDialog";
setButtons(Help | User1 | Cancel);
diff --git a/src/kalzium.cpp b/src/kalzium.cpp
--- a/src/kalzium.cpp
+++ b/src/kalzium.cpp
@@ -73,20 +73,20 @@
#define IDS_ELEMENTINFO 7
-Kalzium::Kalzium() : KXmlGuiWindow(0)
+Kalzium::Kalzium() : KXmlGuiWindow(nullptr)
{
setObjectName("KalziumMainWindow");
// Init pointers with null
- m_infoDialog = 0;
- m_isotopeDialog = 0;
- m_elementDataPlotter = 0;
- m_tablesDialog = 0;
- m_rsDialog = 0;
- m_calculator = 0;
- m_exportDialog = 0;
- m_glossarydlg = 0;
- m_elementInfo = 0;
+ m_infoDialog = nullptr;
+ m_isotopeDialog = nullptr;
+ m_elementDataPlotter = nullptr;
+ m_tablesDialog = nullptr;
+ m_rsDialog = nullptr;
+ m_calculator = nullptr;
+ m_exportDialog = nullptr;
+ m_glossarydlg = nullptr;
+ m_elementInfo = nullptr;
// reading the elements from file
KalziumDataObject::instance();
@@ -381,7 +381,7 @@
if (!QGLFormat::hasOpenGL()) {
QMessageBox::critical(Q_NULLPTR, i18n("Kalzium Error"), i18n("This system does not support OpenGL."));
- return NULL;
+ return nullptr;
}
MoleculeDialog * d = new MoleculeDialog(this);
@@ -400,7 +400,7 @@
}
#endif
#endif
- return NULL;
+ return nullptr;
}
void Kalzium::slotTables()
diff --git a/src/kalziumdataobject.cpp b/src/kalziumdataobject.cpp
--- a/src/kalziumdataobject.cpp
+++ b/src/kalziumdataobject.cpp
@@ -50,7 +50,7 @@
}
KalziumDataObject::KalziumDataObject()
- : m_search(0)
+ : m_search(nullptr)
{
// reading elements
ElementSaxParser * parser = new ElementSaxParser();
@@ -135,7 +135,7 @@
{
// checking that we are requesting a valid element
if ((number <= 0) || (number > m_numOfElements))
- return 0;
+ return nullptr;
return ElementList[ number-1 ];
}
@@ -172,7 +172,7 @@
}
}
- return 0;
+ return nullptr;
}
diff --git a/src/kalziumgradienttype.cpp b/src/kalziumgradienttype.cpp
--- a/src/kalziumgradienttype.cpp
+++ b/src/kalziumgradienttype.cpp
@@ -54,7 +54,7 @@
KalziumGradientType* KalziumGradientTypeFactory::build(int id) const
{
if ((id < 0) || (id >= m_gradients.count()))
- return 0;
+ return nullptr;
return m_gradients.at(id);
}
@@ -67,7 +67,7 @@
}
}
- return 0;
+ return nullptr;
}
QStringList KalziumGradientTypeFactory::gradients() const
@@ -90,7 +90,7 @@
KalziumGradientType* KalziumGradientType::instance()
{
- return 0;
+ return nullptr;
}
double KalziumGradientType::elementCoeff(int el) const
diff --git a/src/kalziumnumerationtype.cpp b/src/kalziumnumerationtype.cpp
--- a/src/kalziumnumerationtype.cpp
+++ b/src/kalziumnumerationtype.cpp
@@ -40,7 +40,7 @@
KalziumNumerationType* KalziumNumerationTypeFactory::build(int id) const
{
if ((id < 0) || (id >= m_numerations.count())) {
- return 0;
+ return nullptr;
}
return m_numerations.at(id);
@@ -55,7 +55,7 @@
}
// not found
- return 0;
+ return nullptr;
}
QStringList KalziumNumerationTypeFactory::numerations() const
@@ -70,7 +70,7 @@
KalziumNumerationType* KalziumNumerationType::instance()
{
- return 0;
+ return nullptr;
}
KalziumNumerationType::KalziumNumerationType()
diff --git a/src/kalziumschemetype.cpp b/src/kalziumschemetype.cpp
--- a/src/kalziumschemetype.cpp
+++ b/src/kalziumschemetype.cpp
@@ -55,7 +55,7 @@
KalziumSchemeType* KalziumSchemeTypeFactory::build(int id) const
{
if ((id < 0) || (id >= m_schemes.count())) {
- return 0;
+ return nullptr;
}
return m_schemes.at(id);
@@ -69,7 +69,7 @@
}
}
- return 0;
+ return nullptr;
}
QStringList KalziumSchemeTypeFactory::schemes() const
@@ -84,7 +84,7 @@
KalziumSchemeType* KalziumSchemeType::instance()
{
- return 0;
+ return nullptr;
}
KalziumSchemeType::KalziumSchemeType()
diff --git a/src/kalziumutils.cpp b/src/kalziumutils.cpp
--- a/src/kalziumutils.cpp
+++ b/src/kalziumutils.cpp
@@ -127,10 +127,11 @@
}
case ChemicalDataObject::date: // a date
{
- val = el->dataAsVariant(kind).toInt();
+ //val = el->dataAsVariant(kind).toInt();
+ int v_int = el->dataAsVariant(kind).toInt();
if (val > 1600) {
result = i18n("This element was discovered in the year %1.", val);
- } else if (val == -1) {
+ } else if (v_int == -1) {
result = i18n("The element has not yet been officially recognized by the IUPAC.");
} else { // this should now really be 0. If not there is a bug in the database
result = i18n("This element was known to ancient cultures.");
diff --git a/src/kdeeduglossary.cpp b/src/kdeeduglossary.cpp
--- a/src/kdeeduglossary.cpp
+++ b/src/kdeeduglossary.cpp
@@ -454,7 +454,7 @@
return itemchild;
}
}
- return 0;
+ return nullptr;
}
void GlossaryDialog::Private::itemActivated(QTreeWidgetItem * item, int column)
diff --git a/src/main.cpp b/src/main.cpp
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -149,7 +149,7 @@
parser.addOption(QCommandLineOption(QStringList() << QLatin1String("m") << QLatin1String("molecule"), i18n("Open the given molecule file"), QLatin1String("file")));
#endif
- Kalzium *mainWin = 0;
+ Kalzium *mainWin = nullptr;
if (app.isSessionRestored()) {
RESTORE(Kalzium);
diff --git a/src/rsdialog.cpp b/src/rsdialog.cpp
--- a/src/rsdialog.cpp
+++ b/src/rsdialog.cpp
@@ -317,6 +317,6 @@
void RSDialog::invalidPhaseString()
{
- KMessageBox::error(0, i18n("At least one of the specified phrases is invalid."));
+ KMessageBox::error(nullptr, i18n("At least one of the specified phrases is invalid."));
}
diff --git a/src/searchwidget.cpp b/src/searchwidget.cpp
--- a/src/searchwidget.cpp
+++ b/src/searchwidget.cpp
@@ -28,7 +28,7 @@
#include "kalziumdataobject.h"
#include "search.h"
-SearchWidget::SearchWidget(QWidget *parent) : QWidget(parent), m_timer(0)
+SearchWidget::SearchWidget(QWidget *parent) : QWidget(parent), m_timer(nullptr)
{
QHBoxLayout *mainlay = new QHBoxLayout(this);
mainlay->setMargin(2);
diff --git a/src/spectrumviewimpl.cpp b/src/spectrumviewimpl.cpp
--- a/src/spectrumviewimpl.cpp
+++ b/src/spectrumviewimpl.cpp
@@ -73,7 +73,7 @@
QStringList row = QStringList() << QString::number(peakWavelength)
<< QString::number(peak->intensity);
- items.append(new QTreeWidgetItem((QTreeWidget*)0, row));
+ items.append(new QTreeWidgetItem((QTreeWidget*)nullptr, row));
}
peakListTable->insertTopLevelItems(0, items);
}
diff --git a/src/spectrumwidget.cpp b/src/spectrumwidget.cpp
--- a/src/spectrumwidget.cpp
+++ b/src/spectrumwidget.cpp
@@ -321,7 +321,7 @@
void SpectrumWidget::findPeakFromMouseposition(double wavelength)
{
qDebug() << "SpectrumWidget::findPeakFromMouseposition()";
- Spectrum::peak *peak = NULL;
+ Spectrum::peak *peak = nullptr;
//find the difference in percent (1.0 is 100%, 0.1 is 10%)
double dif = 0.0;