summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnu Mittal <anu22mittal@gmail.com>2015-03-15 02:16:11 (GMT)
committerAnu Mittal <anu22mittal@gmail.com>2015-03-15 02:16:11 (GMT)
commit66be2212a43f328da215317f8763c9ac393882f2 (patch)
tree15f6d4854994f3a0583781a92b6aa80e5f9a68fb
parent2ba297327953b4083b584c8f8a726973add25782 (diff)
Removing warnings from kalzium.cpp
-rw-r--r--CMakeLists.txt4
-rw-r--r--compoundviewer/openbabel2wrapper.cpp1
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/kalzium.cpp58
4 files changed, 32 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68ecfc7..29f0395 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 2.8.12)
find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${OPENBABEL2_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/cmake/modules)
find_package(OpenBabel2 REQUIRED)
-find_package(Qt5 REQUIRED COMPONENTS Widgets Script Core Gui Declarative OpenGL)
+find_package(Qt5 REQUIRED COMPONENTS Widgets Script Core Declarative Gui OpenGL)
find_package(Qt5Svg REQUIRED)
find_package(KF5 REQUIRED COMPONENTS Plotting CoreAddons Solid Config Archive KHtml I18n Parts UnitConversion WidgetsAddons NewStuff KDELibs4Support)
find_package(Gettext REQUIRED)
@@ -19,7 +19,7 @@ include(KDECMakeSettings)
include(FeatureSummary)
include(ECMInstallIcons)
include(ECMMarkNonGuiExecutable)
-include_directories(${OPENBABEL2_INCLUDE_DIR} ${AVOGADRO_INCLUDE_DIR} ${OPENGL_INCLUDE_DIRS} ${Qt5Declarative_INCLUDE_DIR})
+include_directories(${OPENBABEL2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIRS} ${Qt5Declarative_INCLUDE_DIR})
set(CMAKE_MODULE_PATH ${kalzium_SOURCE_DIR}/cmake/modules )
# search packages used by KDE
diff --git a/compoundviewer/openbabel2wrapper.cpp b/compoundviewer/openbabel2wrapper.cpp
index 1e0dd59..e0051a2 100644
--- a/compoundviewer/openbabel2wrapper.cpp
+++ b/compoundviewer/openbabel2wrapper.cpp
@@ -19,7 +19,6 @@
#include <QMessageBox>
#include <KLocalizedString>
-
#include <sstream>
#include <stdio.h>
#include <iostream>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2ee0c95..8270f38 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,7 +24,7 @@ if (OPENBABEL2_FOUND)
qt5_wrap_ui(kalziumtools_SRCS
tools/obconverterwidget.ui
)
- include_directories(${OPENBABEL2_INCLUDE_DIR})
+ include_directories(${OPENBABEL2_INCLUDE_DIR} ${AVOGADROLIBS_INCLUDE_DIR})
if (EIGEN3_FOUND AND Avogadro_FOUND)
diff --git a/src/kalzium.cpp b/src/kalzium.cpp
index f51c36b..54fc11d 100644
--- a/src/kalzium.cpp
+++ b/src/kalzium.cpp
@@ -34,7 +34,7 @@
#include "tableinfowidget.h"
#include "psetables.h"
#include <config-kalzium.h>
-#include <KGlobal>
+#include <QGlobal>
#ifdef HAVE_FACILE
#include "eqchemview.h"
@@ -51,21 +51,21 @@
#include <QToolBox>
#include <QKeyEvent>
#include <QRegExp>
-#include <KStatusBar>
+#include <QStatusBar>
-#include <kmessagebox.h>
+#include <QMessagebox>
#include <kconfigdialog.h>
-#include <kiconloader.h>
+#include <qiconloader.h>
#include <kaction.h>
#include <kparts/part.h>
#include <kselectaction.h>
-#include <kstandarddirs.h>
+#include <Qstandarddirs>
#include <kstandardaction.h>
-#include <kicon.h>
+#include <QIcon>
#include <kservicetypetrader.h>
-#include <kurl.h>
+#include <QUrl>
#include <kfiledialog.h>
-#include <KLocale>
+#include <QLocale>
#include <KPluginLoader>
// #include <KTabWidget>
#include <QGridLayout>
@@ -77,7 +77,7 @@ Kalzium::Kalzium() : KXmlGuiWindow(0)
setObjectName("KalziumMainWindow");
// adding the libkdeedu catalog
- KGlobal::locale()->insertCatalog("libkdeedu");
+ QGlobal::locale()->insertCatalog("libkdeedu");
// Init pointers with null
m_infoDialog = 0;
@@ -173,35 +173,35 @@ void Kalzium::setupActions()
// tools actions
m_pPlotAction = actionCollection()->addAction("tools_plotdata");
m_pPlotAction->setText(i18n("&Plot Data..."));
- m_pPlotAction->setIcon(KIcon("plot"));
+ m_pPlotAction->setIcon(QIcon("plot"));
connect(m_pPlotAction, SIGNAL(triggered()), this, SLOT(slotPlotData()));
// calculator actions
m_pcalculator = actionCollection()->addAction("tools_calculate");
m_pcalculator->setText(i18n("Perform &Calculations..."));
- m_pcalculator->setIcon(KIcon("calculate"));
+ m_pcalculator->setIcon(QIcon("calculate"));
m_pcalculator->setWhatsThis(i18nc("WhatsThis Help", "This is the calculator, it performs basic chemical calculations."));
connect(m_pcalculator, SIGNAL(triggered()), this, SLOT(showCalculator()));
m_pIsotopeTableAction= actionCollection()->addAction("tools_isotopetable");
m_pIsotopeTableAction->setText(i18n("&Isotope Table..."));
- m_pIsotopeTableAction->setIcon(KIcon("isotopemap"));
+ m_pIsotopeTableAction->setIcon(QIcon("isotopemap"));
m_pIsotopeTableAction->setWhatsThis(i18nc("WhatsThis Help", "This table shows all of the known isotopes of the chemical elements."));
connect(m_pIsotopeTableAction, SIGNAL(triggered()), this, SLOT(slotIsotopeTable()));
m_pGlossaryAction = actionCollection()->addAction("tools_glossary");
m_pGlossaryAction->setText(i18n("&Glossary..."));
- m_pGlossaryAction->setIcon(KIcon("glossary"));
+ m_pGlossaryAction->setIcon(QIcon("glossary"));
connect(m_pGlossaryAction, SIGNAL(triggered()), this, SLOT(slotGlossary()));
m_pRSAction = actionCollection()->addAction("tools_rs");
m_pRSAction->setText(i18n("&R/S Phrases..."));
- m_pRSAction->setIcon(KIcon("kalzium_rs"));
+ m_pRSAction->setIcon(QIcon("kalzium_rs"));
connect(m_pRSAction, SIGNAL(triggered()), this, SLOT(slotRS()));
m_pOBConverterAction = actionCollection()->addAction("tools_obconverter");
m_pOBConverterAction->setText(i18n("Convert chemical files..."));
- m_pOBConverterAction->setIcon(KIcon("edit-copy"));
+ m_pOBConverterAction->setIcon(QIcon("edit-copy"));
m_pOBConverterAction->setWhatsThis(i18nc("WhatsThis Help", "With this tool, you can convert files containing chemical data between various file formats."));
connect(m_pOBConverterAction, SIGNAL(triggered()), this, SLOT(slotOBConverter()));
#ifndef HAVE_OPENBABEL2
@@ -210,7 +210,7 @@ void Kalzium::setupActions()
m_pMoleculesviewer = actionCollection()->addAction("tools_moleculeviewer");
m_pMoleculesviewer->setText(i18n("Molecular Editor..."));
- m_pMoleculesviewer->setIcon(KIcon("kalzium_molviewer"));
+ m_pMoleculesviewer->setIcon(QIcon("kalzium_molviewer"));
m_pMoleculesviewer->setWhatsThis(i18nc("WhatsThis Help", "This tool allows you to view and edit 3D molecular structures."));
connect(m_pMoleculesviewer, SIGNAL(triggered()), this, SLOT(slotMoleculeviewer()));
#if !defined(HAVE_OPENBABEL2) || !defined(HAVE_EIGEN) || !defined(HAVE_AVOGADRO)
@@ -219,7 +219,7 @@ void Kalzium::setupActions()
m_pTables = actionCollection()->addAction("tools_tables");
m_pTables->setText(i18n("&Tables..."));
- m_pTables->setIcon(KIcon("kalzium_tables"));
+ m_pTables->setIcon(QIcon("kalzium_tables"));
m_pTables->setWhatsThis(i18nc("WhatsThis Help", "This will open a dialog with listings of symbols and numbers related to chemistry."));
connect(m_pTables, SIGNAL(triggered()), this, SLOT(slotTables()));
@@ -227,17 +227,17 @@ void Kalzium::setupActions()
// other period view options
m_pLegendAction = m_legendDock->toggleViewAction();
actionCollection()->addAction("view_legend", m_pLegendAction);
- m_pLegendAction->setIcon(KIcon("legend"));
+ m_pLegendAction->setIcon(QIcon("legend"));
m_pLegendAction->setWhatsThis(i18nc("WhatsThis Help", "This will show or hide the legend for the periodic table."));
m_SidebarAction = m_dockWin->toggleViewAction();
actionCollection()->addAction("view_sidebar", m_SidebarAction);
- m_SidebarAction->setIcon(KIcon("sidebar"));
+ m_SidebarAction->setIcon(QIcon("sidebar"));
m_SidebarAction->setWhatsThis(i18nc("WhatsThis Help", "This will show or hide a sidebar with additional information and a set of tools."));
m_SidebarAction = m_tableDock->toggleViewAction();
actionCollection()->addAction("view_tablebar", m_SidebarAction);
- m_SidebarAction->setIcon(KIcon("kalzium_tables"));
+ m_SidebarAction->setIcon(QIcon("kalzium_tables"));
m_SidebarAction->setWhatsThis(i18nc("WhatsThis Help", "This will show or hide a sidebar with additional information about the table."));
// the standard actions
@@ -300,7 +300,7 @@ void Kalzium::setupSidebars()
m_detailWidget->setObjectName("DetailedGraphicalOverview");
m_detailWidget->setMinimumSize(200, m_detailWidget->minimumSize().height());
- m_toolbox->addItem(m_detailWidget, KIcon("overview"), i18n("Overview"));
+ m_toolbox->addItem(m_detailWidget, QIcon("overview"), i18n("Overview"));
m_gradientWidget = new GradientWidgetImpl(m_toolbox);
m_gradientWidget->setObjectName("viewtWidget");
@@ -312,7 +312,7 @@ void Kalzium::setupSidebars()
connect(m_gradientWidget->gradient_combo, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotSwitchtoLookGradient(int)));
- m_toolbox->addItem(m_gradientWidget, KIcon("statematter"), i18n("View"));
+ m_toolbox->addItem(m_gradientWidget, QIcon("statematter"), i18n("View"));
addDockWidget(Qt::LeftDockWidgetArea, m_dockWin);
addDockWidget(Qt::BottomDockWidgetArea, m_tableDock, Qt::Horizontal);
@@ -341,14 +341,14 @@ void Kalzium::slotGlossary()
// creating the glossary dialog and loading the glossaries we have
m_glossarydlg = new GlossaryDialog(this);
m_glossarydlg->setObjectName(QLatin1String("glossary"));
- QString dir = KGlobal::dirs()->findResourceDir("data", "kalzium/data/");
+ QString dir = QGlobal::dirs()->findResourceDir("data", "kalzium/data/");
QString picturepath = dir + "kalzium/data/bg.jpg";
- KUrl u = KUrl::fromPath(dir + "kalzium/data/knowledge.xml");
+ QUrl u = QUrl::fromPath(dir + "kalzium/data/knowledge.xml");
Glossary *g = new Glossary(u);
g->setName(i18n("Knowledge"));
g->setBackgroundPicture(picturepath);
m_glossarydlg->addGlossary(g, true);
- u = KUrl::fromPath(dir + "kalzium/data/tools.xml");
+ u = QUrl::fromPath(dir + "kalzium/data/tools.xml");
g = new Glossary(u, dir + "kalzium/data/toolpics/");
g->setName(i18n("Tools"));
g->setBackgroundPicture(picturepath);
@@ -380,7 +380,7 @@ MoleculeDialog *Kalzium::slotMoleculeviewer()
#if defined(HAVE_OPENBABEL2) && defined(HAVE_EIGEN) && defined(HAVE_AVOGADRO)
if (!QGLFormat::hasOpenGL()) {
- KMessageBox::error(0, i18n("This system does not support OpenGL."), i18n("Kalzium Error"));
+ QMessageBox::error(0, i18n("This system does not support OpenGL."), i18n("Kalzium Error"));
return NULL;
}
@@ -556,7 +556,7 @@ void Kalzium::slotShowExportDialog()
void Kalzium::setupStatusBar()
{
- KStatusBar *statusBar = new KStatusBar(this);
+ QStatusBar *statusBar = new QStatusBar(this);
setStatusBar(statusBar);
statusBar->insertItem("", 0, 0);
@@ -570,7 +570,7 @@ void Kalzium::elementHover(int num)
{
// extractIconicInformationAboutElement(num);
Element *e = KalziumDataObject::instance()->element(num);
- KStatusBar *statusBar = new KStatusBar(this);
+ QStatusBar *statusBar = new QStatusBar(this);
setStatusBar(statusBar);
statusBar->changeItem(i18nc("For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u",
e->dataAsString(ChemicalDataObject::name),
@@ -584,7 +584,7 @@ void Kalzium::elementHover(int num)
void Kalzium::extractIconicInformationAboutElement(int elementNumber)
{
QString setname = "school";
- QString pathname = KGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
+ QString pathname = QGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
QString filename = pathname + setname + '/' + "iconinformation.txt";
QFile file(filename);