summaryrefslogtreecommitdiff
path: root/scripts
authorar <ar>2005-01-21 19:56:15 (UTC)
committer ar <ar>2005-01-21 19:56:15 (UTC)
commitcd51d382be50bc021739395309e23760f1619759 (patch) (side-by-side diff)
treee76155f772df7faea5fcf38667c6da8c916208db /scripts
parentfdc37fbd908472e28735a8f0b01e3e66a43535e0 (diff)
downloadopie-cd51d382be50bc021739395309e23760f1619759.zip
opie-cd51d382be50bc021739395309e23760f1619759.tar.gz
opie-cd51d382be50bc021739395309e23760f1619759.tar.bz2
- make opie compilable against qte 2.3.10 snapshot
check QT_VERSION against 0x030000 instead of 300
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/kconfig/qconf.cc16
-rw-r--r--scripts/kconfig/qconf.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 52419ad..0459caf 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -14,26 +14,26 @@
#include <qmenubar.h>
#include <qmessagebox.h>
#include <qaction.h>
#include <qheader.h>
#include <qfiledialog.h>
#include <qregexp.h>
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
#include <qsettings.h>
#endif
#include <stdlib.h>
#include "lkc.h"
#include "qconf.h"
#include "qconf.moc"
#include "images.c"
static QApplication *configApp;
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
static QSettings *configSettings;
#endif
/*
* update all the children of a menu entry
* removes/adds the entries from the parent widget as necessary
@@ -99,13 +99,13 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu)
last = last->nextSibling();
delete item;
}
}
}
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
/*
* set the new data
* TODO check the value
*/
void ConfigItem::okRename(int col)
{
@@ -212,13 +212,13 @@ void ConfigItem::updateMenu(void)
case S_INT:
case S_HEX:
case S_STRING:
const char* data;
data = sym_get_string_value(sym);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
int i = list->mapIdx(dataColIdx);
if (i >= 0)
setRenameEnabled(i, TRUE);
#endif
setText(dataColIdx, data);
if (type == S_STRING)
@@ -487,13 +487,13 @@ void ConfigList::changeValue(ConfigItem* item)
if (oldexpr != newexpr)
parent()->updateList(item);
break;
case S_INT:
case S_HEX:
case S_STRING:
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if (colMap[dataColIdx] >= 0)
item->startRename(colMap[dataColIdx]);
else
#endif
parent()->lineEdit->show(item);
break;
@@ -748,13 +748,13 @@ ConfigMainWindow::ConfigMainWindow(void)
QSplitter* split2;
bool ok;
int x, y, width, height;
QWidget *d = configApp->desktop();
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
width = configSettings->readNumEntry("/kconfig/qconf/window width", d->width() - 64);
height = configSettings->readNumEntry("/kconfig/qconf/window height", d->height() - 64);
resize(width, height);
x = configSettings->readNumEntry("/kconfig/qconf/window x", 0, &ok);
if (ok)
y = configSettings->readNumEntry("/kconfig/qconf/window y", 0, &ok);
@@ -1263,13 +1263,13 @@ int main(int ac, char** av)
#ifndef LKC_DIRECT_LINK
kconfig_load();
#endif
progname = av[0];
configApp = new QApplication(ac, av);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
configSettings = new QSettings;
#endif
if (ac > 1 && av[1][0] == '-') {
switch (av[1][1]) {
case 'h':
case '?':
@@ -1290,13 +1290,13 @@ int main(int ac, char** av)
//zconfdump(stdout);
v->show();
configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
configApp->exec();
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
configSettings->writeEntry("/kconfig/qconf/window x", v->pos().x());
configSettings->writeEntry("/kconfig/qconf/window y", v->pos().y());
configSettings->writeEntry("/kconfig/qconf/window width", v->size().width());
configSettings->writeEntry("/kconfig/qconf/window height", v->size().height());
delete configSettings;
#endif
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index c548884..dee5254 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -138,13 +138,13 @@ public:
: Parent(parent, after), menu(0), visible(v), goParent(true)
{
init();
}
~ConfigItem(void);
void init(void);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
void okRename(int col);
#endif
void updateMenu(void);
void testUpdateMenu(bool v);
ConfigList* listView() const
{