-rw-r--r-- | scripts/kconfig/qconf.cc | 16 | ||||
-rw-r--r-- | scripts/kconfig/qconf.h | 2 |
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 @@ -12,30 +12,30 @@ #include <qtextview.h> #include <qlineedit.h> #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 * * parent: either the menu list widget or a menu entry widget @@ -97,17 +97,17 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu) last = 0; else while (last->nextSibling() != item) 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) { Parent::okRename(col); sym_set_string_value(menu->sym, text(dataColIdx).latin1()); @@ -210,17 +210,17 @@ void ConfigItem::updateMenu(void) setText(dataColIdx, QChar(ch)); break; 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) prompt.sprintf("%s: %s", prompt.latin1(), data); else @@ -485,17 +485,17 @@ void ConfigList::changeValue(ConfigItem* item) item->setOpen(TRUE); } 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; } } @@ -746,17 +746,17 @@ ConfigMainWindow::ConfigMainWindow(void) QMenuBar* menu; QSplitter* split1; 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); if (ok) move(x, y); @@ -1261,17 +1261,17 @@ int main(int ac, char** av) const char *name; #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 '?': usage(); } @@ -1288,17 +1288,17 @@ int main(int ac, char** av) v = new ConfigMainWindow(); //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 return 0; } 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 @@ -136,17 +136,17 @@ public: } ConfigItem(QListView *parent, ConfigItem *after, bool v) : 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 { return (ConfigList*)Parent::listView(); } |