summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Feck <cfeck@kde.org>2015-07-10 16:36:01 (GMT)
committerChristoph Feck <cfeck@kde.org>2015-07-10 16:36:01 (GMT)
commitf6c7e5f579bc34e2b75f915f345ba3813ff05581 (patch)
tree3d485413ee01d42b761ccdb2711ad85e7eeb0408
parentf73f5ea045a2498f1b9a7a56c655c5c4a1222624 (diff)
Revert changes to wrong Qt classes
-rw-r--r--src/detailinfodlg.cpp15
-rw-r--r--src/eqchemview.cpp1
-rw-r--r--src/gradientwidget_impl.cpp2
-rw-r--r--src/kalzium.cpp8
-rw-r--r--src/kalziumdataobject.cpp8
-rw-r--r--src/main.cpp18
6 files changed, 26 insertions, 26 deletions
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
index 3dabf32..e6c60d1 100644
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -29,10 +29,9 @@
#include <KConfig>
#include <KConfigWidgets/khelpclient.h>
#include <krun.h>
-#include <QGlobal>
+#include <KGlobal>
#include <QIcon>
#include <KPageDialog>
-#include <QMessage>
#include <KUrl>
#include "psetables.h"
@@ -58,10 +57,10 @@ DetailedInfoDlg::DetailedInfoDlg(int el, QWidget *parent) : KPageDialog(parent),
setButtonGuiItem(User2, KGuiItem(i18nc("Previous element", "Previous"),(layoutDirection() == Qt::LeftToRight) ? "arrow-left" : "arrow-right", i18n("Goes to the previous element")));
resize(820, 580);
*/
- m_baseHtml = QGlobal::dirs()->findResourceDir("appdata", "data/") + "data/htmlview/";
- m_baseHtml2 = QGlobal::dirs()->findResourceDir("appdata", "data/") + "data/hazardsymbols/";
+ m_baseHtml = KGlobal::dirs()->findResourceDir("appdata", "data/") + "data/htmlview/";
+ m_baseHtml2 = KGlobal::dirs()->findResourceDir("appdata", "data/") + "data/hazardsymbols/";
-//X m_picsdir = QGlobal::dirs()->findResourceDir("appdata", "elempics/") + "elempics/";
+//X m_picsdir = KGlobal::dirs()->findResourceDir("appdata", "elempics/") + "elempics/";
// creating the tabs but not the contents, as that will be done when setting the element
createContent();
@@ -283,7 +282,7 @@ QString DetailedInfoDlg::getHtml(DATATYPE type)
}
case EXTRA:
{
- QString language(QGlobal::locale()->languageCodeToName(QGlobal::locale()->language()));
+ QString language(KGlobal::locale()->languageCodeToName(KGlobal::locale()->language()));
//Wikipedia.org
// html.append ("<tr><td><img src=\"wiki.png\" alt=\"icon\"/></td><td>");
@@ -306,7 +305,7 @@ QString DetailedInfoDlg::getHtml(DATATYPE type)
html.append ("<tr><td>");
html.append ("<a href=\"http://"); // http://
html.append ("www.webelements.com/");
- if (QGlobal::locale()->language().split('_').at(0) == "en") {
+ if (KGlobal::locale()->language().split('_').at(0) == "en") {
html.append (m_element->dataAsString(ChemicalDataObject::name).toLower()); // hydrogen
}
html.append ("\" target=\"_blank\" >");
@@ -558,7 +557,7 @@ QString DetailedInfoDlg::createWikiLink(QString link)
QString DetailedInfoDlg::createWikiLink(QString link, QString displayString)
{
QString html;
- QString language(QGlobal::locale()->language());
+ QString language(KGlobal::locale()->language());
//Wikipedia.org
html.append ("<a href=\"http://"); // http://
diff --git a/src/eqchemview.cpp b/src/eqchemview.cpp
index ebce0be..25ac9aa 100644
--- a/src/eqchemview.cpp
+++ b/src/eqchemview.cpp
@@ -23,6 +23,7 @@
#include <QClipboard>
#include <kdebug.h>
+#include <klocale.h>
#include "ui_equationview.h"
diff --git a/src/gradientwidget_impl.cpp b/src/gradientwidget_impl.cpp
index 6d7ffba..d05a02a 100644
--- a/src/gradientwidget_impl.cpp
+++ b/src/gradientwidget_impl.cpp
@@ -16,7 +16,7 @@
#include <QTimer>
#include <kdebug.h>
-#include <QLocale>
+#include <KLocale>
#include <QIcon>
#include <element.h>
diff --git a/src/kalzium.cpp b/src/kalzium.cpp
index f9ce77a..01d2430 100644
--- a/src/kalzium.cpp
+++ b/src/kalzium.cpp
@@ -51,7 +51,7 @@
#include <QToolBox>
#include <QKeyEvent>
#include <QRegExp>
-#include <QStatusBar>
+#include <KStatusBar>
#include <QMessageBox>
#include <kconfigdialog.h>
@@ -557,7 +557,7 @@ void Kalzium::slotShowExportDialog()
void Kalzium::setupStatusBar()
{
- QStatusBar *statusBar = new QStatusBar(this);
+ KStatusBar *statusBar = new KStatusBar(this);
setStatusBar(statusBar);
statusBar->insertItem("", 0, 0);
@@ -571,7 +571,7 @@ void Kalzium::elementHover(int num)
{
// extractIconicInformationAboutElement(num);
Element *e = KalziumDataObject::instance()->element(num);
- QStatusBar *statusBar = new QStatusBar(this);
+ KStatusBar *statusBar = new KStatusBar(this);
setStatusBar(statusBar);
statusBar->changeItem(i18nc("For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u",
e->dataAsString(ChemicalDataObject::name),
@@ -585,7 +585,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 = KGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
QString filename = pathname + setname + '/' + "iconinformation.txt";
QFile file(filename);
diff --git a/src/kalziumdataobject.cpp b/src/kalziumdataobject.cpp
index b527991..e123415 100644
--- a/src/kalziumdataobject.cpp
+++ b/src/kalziumdataobject.cpp
@@ -32,8 +32,8 @@
#include <kdebug.h>
#include <QUrl>
#include <kstandarddirs.h>
-#include <QPixmapCache>
-#include <QGlobal>
+#include <KPixmapCache>
+#include <KGlobal>
#include <kunitconversion/converter.h>
struct StaticKalziumDataObject
@@ -192,11 +192,11 @@ void KalziumDataObject::cleanup()
void KalziumDataObject::loadIconSet()
{
- QPixmapCache cache("kalzium");
+ KPixmapCache cache("kalzium");
//FIXME in case we ever get more than one theme we need
//a settings-dialog where we can select the different iconsets...
const QString setname = "school";
- const QString pathname = QGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
+ const QString pathname = KGlobal::dirs()->findResourceDir("appdata", "data/iconsets/") + "data/iconsets/";
for (int i = 0; i < m_numOfElements; ++i)
{
diff --git a/src/main.cpp b/src/main.cpp
index d4d20cd..48d40ca 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,9 +18,9 @@
***************************************************************************/
#include <kaboutdata.h>
-#include <QCommandLineOption>
-#include <QLocale>
-#include <kaboutdata.h>
+#include <KCmdLineArgs>
+#include <KLocale>
+#include <k4aboutdata.h>
#include <kapplication.h>
@@ -46,8 +46,8 @@ int main(int argc, char **argv)
caml_startup(argv);
#endif
- KAboutData about("kalzium", 0, ki18n("Kalzium"), version, ki18n(description),
- KAboutData::License_GPL, ki18n("(C) 2002-2014 Carsten Niehaus"), KLocalizedString(), "http://edu.kde.org/kalzium");
+ K4AboutData about("kalzium", 0, ki18n("Kalzium"), version, ki18n(description),
+ K4AboutData::License_GPL, ki18n("(C) 2002-2014 Carsten Niehaus"), KLocalizedString(), "http://edu.kde.org/kalzium");
about.addAuthor(ki18n("Carsten Niehaus"), KLocalizedString(), "cniehaus@kde.org");
about.addCredit(ki18n("Pino Toscano"), ki18n("Large code contributions; resident guru helping the other developers"));
about.addCredit(ki18n("Benoit Jacob"), ki18n("Base work on the molecular viewer, mentored Marcus during his SoC"));
@@ -74,12 +74,12 @@ int main(int argc, char **argv)
about.addCredit(ki18n("Tiago Porangaba"),ki18n("New interface design and usability improvements"));
about.addCredit(ki18n("Etienne Rebetez"),ki18n("Adding new sizable Periodic System"));
- QCommandLineParser::init(argc, argv, &about);
- qCmdLineOptions options;
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineOptions options;
#if defined(HAVE_OPENBABEL2) && defined(HAVE_EIGEN) && defined(HAVE_AVOGADRO)
options.add("molecule <file>", ki18n("Open the given molecule file"));
#endif
- QCommandLineParser::addCmdLineOptions(options);
+ KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
Kalzium *mainWin = 0;
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
RESTORE(Kalzium);
} else {
// no session.. just start up normally
- QCommandLineParser *args = QCommandLineParser::parsedArgs();
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
/// @todo do something with the command line args here