/[linux-patches]/genpatches-2.6/tags/2.6.34-10/2900_xconfig-with-qt4.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.34-10/2900_xconfig-with-qt4.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1771 - (show annotations) (download)
Tue Aug 31 14:13:10 2010 UTC (3 years, 10 months ago) by mpagano
File size: 25312 byte(s)
2.6.34-10 release
1 --- a/scripts/kconfig/Makefile 2010-05-20 16:09:21.000000000 -0400
2 +++ b/scripts/kconfig/Makefile 2010-05-20 16:01:19.000000000 -0400
3 @@ -223,6 +223,7 @@ $(obj)/.tmp_qtcheck:
4 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
5 pkg-config --exists qt 2> /dev/null && pkg=qt; \
6 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
7 + pkg-config --exists Qt3Support 2> /dev/null && pkg=Qt3Support; \
8 if [ -n "$$pkg" ]; then \
9 cflags="\$$(shell pkg-config $$pkg --cflags)"; \
10 libs="\$$(shell pkg-config $$pkg --libs)"; \
11 --- a/scripts/kconfig/expr.h 2010-05-20 16:09:26.000000000 -0400
12 +++ b/scripts/kconfig/expr.h 2010-05-20 16:01:24.000000000 -0400
13 @@ -171,6 +171,8 @@ struct menu {
14 void *data;
15 };
16
17 +typedef struct menu KCMenu; /* HACK: to avoid qt4 moc getting confused by structs - JS */
18 +
19 #define MENU_CHANGED 0x0001
20 #define MENU_ROOT 0x0002
21
22 --- a/scripts/kconfig/qconf.h 2010-05-20 16:09:30.000000000 -0400
23 +++ b/scripts/kconfig/qconf.h 2010-05-20 16:01:50.000000000 -0400
24 @@ -3,9 +3,18 @@
25 * Released under the terms of the GNU GPL v2.0.
26 */
27
28 -#include <qlistview.h>
29 +#include <q3listview.h>
30 #if QT_VERSION >= 300
31 #include <qsettings.h>
32 +//Added by qt3to4:
33 +#include <QContextMenuEvent>
34 +#include <QCloseEvent>
35 +#include <QFocusEvent>
36 +#include <Q3ValueList>
37 +#include <QPixmap>
38 +#include <QMouseEvent>
39 +#include <Q3PopupMenu>
40 +#include <QKeyEvent>
41 #else
42 class QSettings {
43 public:
44 @@ -34,8 +43,8 @@ class ConfigMainWindow;
45
46 class ConfigSettings : public QSettings {
47 public:
48 - QValueList<int> readSizes(const QString& key, bool *ok);
49 - bool writeSizes(const QString& key, const QValueList<int>& value);
50 + Q3ValueList<int> readSizes(const QString& key, bool *ok);
51 + bool writeSizes(const QString& key, const Q3ValueList<int>& value);
52 };
53
54 enum colIdx {
55 @@ -45,9 +54,9 @@ enum listMode {
56 singleMode, menuMode, symbolMode, fullMode, listMode
57 };
58
59 -class ConfigList : public QListView {
60 +class ConfigList : public Q3ListView {
61 Q_OBJECT
62 - typedef class QListView Parent;
63 + typedef class Q3ListView Parent;
64 public:
65 ConfigList(ConfigView* p, const char *name = 0);
66 void reinit(void);
67 @@ -55,7 +64,7 @@ public:
68 {
69 return (ConfigView*)Parent::parent();
70 }
71 - ConfigItem* findConfigItem(struct menu *);
72 + ConfigItem* findConfigItem(KCMenu *);
73
74 protected:
75 void keyPressEvent(QKeyEvent *e);
76 @@ -67,7 +76,7 @@ protected:
77 void contextMenuEvent(QContextMenuEvent *e);
78
79 public slots:
80 - void setRootMenu(struct menu *menu);
81 + void setRootMenu(KCMenu *menu);
82
83 void updateList(ConfigItem *item);
84 void setValue(ConfigItem* item, tristate val);
85 @@ -75,10 +84,10 @@ public slots:
86 void updateSelection(void);
87 void saveSettings(void);
88 signals:
89 - void menuChanged(struct menu *menu);
90 - void menuSelected(struct menu *menu);
91 + void menuChanged(KCMenu *menu);
92 + void menuSelected(KCMenu *menu);
93 void parentSelected(void);
94 - void gotFocus(struct menu *);
95 + void gotFocus(KCMenu *);
96
97 public:
98 void updateListAll(void)
99 @@ -116,7 +125,7 @@ public:
100 void setParentMenu(void);
101
102 template <class P>
103 - void updateMenuList(P*, struct menu*);
104 + void updateMenuList(P*, KCMenu*);
105
106 bool updateAll;
107
108 @@ -126,30 +135,30 @@ public:
109
110 bool showAll, showName, showRange, showData;
111 enum listMode mode;
112 - struct menu *rootEntry;
113 + KCMenu *rootEntry;
114 QColorGroup disabledColorGroup;
115 QColorGroup inactivedColorGroup;
116 - QPopupMenu* headerPopup;
117 + Q3PopupMenu* headerPopup;
118
119 private:
120 int colMap[colNr];
121 int colRevMap[colNr];
122 };
123
124 -class ConfigItem : public QListViewItem {
125 - typedef class QListViewItem Parent;
126 +class ConfigItem : public Q3ListViewItem {
127 + typedef class Q3ListViewItem Parent;
128 public:
129 - ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
130 + ConfigItem(Q3ListView *parent, ConfigItem *after, KCMenu *m, bool v)
131 : Parent(parent, after), menu(m), visible(v), goParent(false)
132 {
133 init();
134 }
135 - ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
136 + ConfigItem(ConfigItem *parent, ConfigItem *after, KCMenu *m, bool v)
137 : Parent(parent, after), menu(m), visible(v), goParent(false)
138 {
139 init();
140 }
141 - ConfigItem(QListView *parent, ConfigItem *after, bool v)
142 + ConfigItem(Q3ListView *parent, ConfigItem *after, bool v)
143 : Parent(parent, after), menu(0), visible(v), goParent(true)
144 {
145 init();
146 @@ -192,7 +201,7 @@ public:
147 void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
148
149 ConfigItem* nextItem;
150 - struct menu *menu;
151 + KCMenu *menu;
152 bool visible;
153 bool goParent;
154 };
155 @@ -213,9 +222,9 @@ public:
156 ConfigItem *item;
157 };
158
159 -class ConfigView : public QVBox {
160 +class ConfigView : public Q3VBox {
161 Q_OBJECT
162 - typedef class QVBox Parent;
163 + typedef class Q3VBox Parent;
164 public:
165 ConfigView(QWidget* parent, const char *name = 0);
166 ~ConfigView(void);
167 @@ -244,22 +253,22 @@ public:
168 ConfigView* nextView;
169 };
170
171 -class ConfigInfoView : public QTextBrowser {
172 +class ConfigInfoView : public Q3TextBrowser {
173 Q_OBJECT
174 - typedef class QTextBrowser Parent;
175 + typedef class Q3TextBrowser Parent;
176 public:
177 ConfigInfoView(QWidget* parent, const char *name = 0);
178 bool showDebug(void) const { return _showDebug; }
179
180 public slots:
181 - void setInfo(struct menu *menu);
182 + void setInfo(KCMenu *menu);
183 void saveSettings(void);
184 void setSource(const QString& name);
185 void setShowDebug(bool);
186
187 signals:
188 void showDebugChanged(bool);
189 - void menuSelected(struct menu *);
190 + void menuSelected(KCMenu *);
191
192 protected:
193 void symbolInfo(void);
194 @@ -267,11 +276,11 @@ protected:
195 QString debug_info(struct symbol *sym);
196 static QString print_filter(const QString &str);
197 static void expr_print_help(void *data, struct symbol *sym, const char *str);
198 - QPopupMenu* createPopupMenu(const QPoint& pos);
199 + Q3PopupMenu* createPopupMenu(const QPoint& pos);
200 void contentsContextMenuEvent(QContextMenuEvent *e);
201
202 struct symbol *sym;
203 - struct menu *menu;
204 + KCMenu *menu;
205 bool _showDebug;
206 };
207
208 @@ -295,7 +304,7 @@ protected:
209 struct symbol **result;
210 };
211
212 -class ConfigMainWindow : public QMainWindow {
213 +class ConfigMainWindow : public Q3MainWindow {
214 Q_OBJECT
215
216 static QAction *saveAction;
217 @@ -303,8 +312,8 @@ class ConfigMainWindow : public QMainWin
218 public:
219 ConfigMainWindow(void);
220 public slots:
221 - void changeMenu(struct menu *);
222 - void setMenuLink(struct menu *);
223 + void changeMenu(KCMenu *);
224 + void setMenuLink(KCMenu *);
225 void listFocusChanged(void);
226 void goBack(void);
227 void loadConfig(void);
228 @@ -327,7 +336,7 @@ protected:
229 ConfigView *configView;
230 ConfigList *configList;
231 ConfigInfoView *helpText;
232 - QToolBar *toolBar;
233 + Q3ToolBar *toolBar;
234 QAction *backAction;
235 QSplitter* split1;
236 QSplitter* split2;
237 --- a/scripts/kconfig/qconf.cc 2010-05-20 16:09:34.000000000 -0400
238 +++ b/scripts/kconfig/qconf.cc 2010-05-20 16:01:46.000000000 -0400
239 @@ -4,24 +4,35 @@
240 */
241
242 #include <qapplication.h>
243 -#include <qmainwindow.h>
244 +#include <q3mainwindow.h>
245 #include <qdesktopwidget.h>
246 -#include <qtoolbar.h>
247 +#include <q3toolbar.h>
248 #include <qlayout.h>
249 -#include <qvbox.h>
250 +#include <q3vbox.h>
251 #include <qsplitter.h>
252 -#include <qlistview.h>
253 -#include <qtextbrowser.h>
254 +#include <q3listview.h>
255 +#include <q3textbrowser.h>
256 #include <qlineedit.h>
257 #include <qlabel.h>
258 #include <qpushbutton.h>
259 #include <qmenubar.h>
260 #include <qmessagebox.h>
261 #include <qaction.h>
262 -#include <qheader.h>
263 -#include <qfiledialog.h>
264 -#include <qdragobject.h>
265 +#include <q3header.h>
266 +#include <q3filedialog.h>
267 +#include <q3dragobject.h>
268 #include <qregexp.h>
269 +//Added by qt3to4:
270 +#include <QContextMenuEvent>
271 +#include <QPixmap>
272 +#include <QFocusEvent>
273 +#include <QMouseEvent>
274 +#include <QCloseEvent>
275 +#include <Q3ValueList>
276 +#include <QKeyEvent>
277 +#include <Q3HBoxLayout>
278 +#include <Q3VBoxLayout>
279 +#include <Q3PopupMenu>
280
281 #include <stdlib.h>
282
283 @@ -54,9 +65,9 @@ static inline QString qgettext(const QSt
284 /**
285 * Reads a list of integer values from the application settings.
286 */
287 -QValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
288 +Q3ValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
289 {
290 - QValueList<int> result;
291 + Q3ValueList<int> result;
292 QStringList entryList = readListEntry(key, ok);
293 if (ok) {
294 QStringList::Iterator it;
295 @@ -70,10 +81,10 @@ QValueList<int> ConfigSettings::readSize
296 /**
297 * Writes a list of integer values to the application settings.
298 */
299 -bool ConfigSettings::writeSizes(const QString& key, const QValueList<int>& value)
300 +bool ConfigSettings::writeSizes(const QString& key, const Q3ValueList<int>& value)
301 {
302 QStringList stringList;
303 - QValueList<int>::ConstIterator it;
304 + Q3ValueList<int>::ConstIterator it;
305
306 for (it = value.begin(); it != value.end(); ++it)
307 stringList.push_back(QString::number(*it));
308 @@ -385,7 +396,7 @@ void ConfigList::saveSettings(void)
309 }
310 }
311
312 -ConfigItem* ConfigList::findConfigItem(struct menu *menu)
313 +ConfigItem* ConfigList::findConfigItem(KCMenu *menu)
314 {
315 ConfigItem* item = (ConfigItem*)menu->data;
316
317 @@ -399,7 +410,7 @@ ConfigItem* ConfigList::findConfigItem(s
318
319 void ConfigList::updateSelection(void)
320 {
321 - struct menu *menu;
322 + KCMenu *menu;
323 enum prop_type type;
324
325 ConfigItem* item = (ConfigItem*)selectedItem();
326 @@ -422,7 +433,7 @@ void ConfigList::updateList(ConfigItem*
327 if (!rootEntry) {
328 if (mode != listMode)
329 goto update;
330 - QListViewItemIterator it(this);
331 + Q3ListViewItemIterator it(this);
332 ConfigItem* item;
333
334 for (; it.current(); ++it) {
335 @@ -486,7 +497,7 @@ void ConfigList::setValue(ConfigItem* it
336 void ConfigList::changeValue(ConfigItem* item)
337 {
338 struct symbol* sym;
339 - struct menu* menu;
340 + KCMenu* menu;
341 int type, oldexpr, newexpr;
342
343 menu = item->menu;
344 @@ -527,7 +538,7 @@ void ConfigList::changeValue(ConfigItem*
345 }
346 }
347
348 -void ConfigList::setRootMenu(struct menu *menu)
349 +void ConfigList::setRootMenu(KCMenu *menu)
350 {
351 enum prop_type type;
352
353 @@ -546,14 +557,14 @@ void ConfigList::setRootMenu(struct menu
354 void ConfigList::setParentMenu(void)
355 {
356 ConfigItem* item;
357 - struct menu *oldroot;
358 + KCMenu *oldroot;
359
360 oldroot = rootEntry;
361 if (rootEntry == &rootmenu)
362 return;
363 setRootMenu(menu_get_parent_menu(rootEntry->parent));
364
365 - QListViewItemIterator it(this);
366 + Q3ListViewItemIterator it(this);
367 for (; (item = (ConfigItem*)it.current()); it++) {
368 if (item->menu == oldroot) {
369 setCurrentItem(item);
370 @@ -571,9 +582,9 @@ void ConfigList::setParentMenu(void)
371 * menu: entry to be updated
372 */
373 template <class P>
374 -void ConfigList::updateMenuList(P* parent, struct menu* menu)
375 +void ConfigList::updateMenuList(P* parent, KCMenu* menu)
376 {
377 - struct menu* child;
378 + KCMenu* child;
379 ConfigItem* item;
380 ConfigItem* last;
381 bool visible;
382 @@ -635,9 +646,9 @@ void ConfigList::updateMenuList(P* paren
383
384 void ConfigList::keyPressEvent(QKeyEvent* ev)
385 {
386 - QListViewItem* i = currentItem();
387 + Q3ListViewItem* i = currentItem();
388 ConfigItem* item;
389 - struct menu *menu;
390 + KCMenu *menu;
391 enum prop_type type;
392
393 if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
394 @@ -698,7 +709,7 @@ void ConfigList::contentsMouseReleaseEve
395 {
396 QPoint p(contentsToViewport(e->pos()));
397 ConfigItem* item = (ConfigItem*)itemAt(p);
398 - struct menu *menu;
399 + KCMenu *menu;
400 enum prop_type ptype;
401 const QPixmap* pm;
402 int idx, x;
403 @@ -760,7 +771,7 @@ void ConfigList::contentsMouseDoubleClic
404 {
405 QPoint p(contentsToViewport(e->pos()));
406 ConfigItem* item = (ConfigItem*)itemAt(p);
407 - struct menu *menu;
408 + KCMenu *menu;
409 enum prop_type ptype;
410
411 if (!item)
412 @@ -785,7 +796,7 @@ skip:
413
414 void ConfigList::focusInEvent(QFocusEvent *e)
415 {
416 - struct menu *menu = NULL;
417 + KCMenu *menu = NULL;
418
419 Parent::focusInEvent(e);
420
421 @@ -803,8 +814,8 @@ void ConfigList::contextMenuEvent(QConte
422 if (!headerPopup) {
423 QAction *action;
424
425 - headerPopup = new QPopupMenu(this);
426 - action = new QAction(NULL, _("Show Name"), 0, this);
427 + headerPopup = new Q3PopupMenu(this);
428 + action = new QAction(_("Show Name"), this);
429 action->setToggleAction(TRUE);
430 connect(action, SIGNAL(toggled(bool)),
431 parent(), SLOT(setShowName(bool)));
432 @@ -812,7 +823,7 @@ void ConfigList::contextMenuEvent(QConte
433 action, SLOT(setOn(bool)));
434 action->setOn(showName);
435 action->addTo(headerPopup);
436 - action = new QAction(NULL, _("Show Range"), 0, this);
437 + action = new QAction(_("Show Range"), this);
438 action->setToggleAction(TRUE);
439 connect(action, SIGNAL(toggled(bool)),
440 parent(), SLOT(setShowRange(bool)));
441 @@ -820,7 +831,7 @@ void ConfigList::contextMenuEvent(QConte
442 action, SLOT(setOn(bool)));
443 action->setOn(showRange);
444 action->addTo(headerPopup);
445 - action = new QAction(NULL, _("Show Data"), 0, this);
446 + action = new QAction(_("Show Data"), this);
447 action->setToggleAction(TRUE);
448 connect(action, SIGNAL(toggled(bool)),
449 parent(), SLOT(setShowData(bool)));
450 @@ -898,7 +909,7 @@ void ConfigView::setShowData(bool b)
451
452 void ConfigList::setAllOpen(bool open)
453 {
454 - QListViewItemIterator it(this);
455 + Q3ListViewItemIterator it(this);
456
457 for (; it.current(); it++)
458 it.current()->setOpen(open);
459 @@ -952,7 +963,7 @@ void ConfigInfoView::setShowDebug(bool b
460 }
461 }
462
463 -void ConfigInfoView::setInfo(struct menu *m)
464 +void ConfigInfoView::setInfo(KCMenu *m)
465 {
466 if (menu == m)
467 return;
468 @@ -973,7 +984,7 @@ void ConfigInfoView::setSource(const QSt
469
470 switch (p[0]) {
471 case 'm':
472 - struct menu *m;
473 + KCMenu *m;
474
475 if (sscanf(p, "m%p", &m) == 1 && menu != m) {
476 menu = m;
477 @@ -1162,10 +1173,10 @@ void ConfigInfoView::expr_print_help(voi
478 *text += str2;
479 }
480
481 -QPopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
482 +Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
483 {
484 - QPopupMenu* popup = Parent::createPopupMenu(pos);
485 - QAction* action = new QAction(NULL, _("Show Debug Info"), 0, popup);
486 + Q3PopupMenu* popup = Parent::createPopupMenu(pos);
487 + QAction* action = new QAction(_("Show Debug Info"), popup);
488 action->setToggleAction(TRUE);
489 connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
490 connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
491 @@ -1185,8 +1196,8 @@ ConfigSearchWindow::ConfigSearchWindow(C
492 {
493 setCaption("Search Config");
494
495 - QVBoxLayout* layout1 = new QVBoxLayout(this, 11, 6);
496 - QHBoxLayout* layout2 = new QHBoxLayout(0, 0, 6);
497 + Q3VBoxLayout* layout1 = new Q3VBoxLayout(this, 11, 6);
498 + Q3HBoxLayout* layout2 = new Q3HBoxLayout(0, 0, 6);
499 layout2->addWidget(new QLabel(_("Find:"), this));
500 editField = new QLineEdit(this);
501 connect(editField, SIGNAL(returnPressed()), SLOT(search()));
502 @@ -1202,10 +1213,10 @@ ConfigSearchWindow::ConfigSearchWindow(C
503 list = new ConfigView(split, name);
504 list->list->mode = listMode;
505 info = new ConfigInfoView(split, name);
506 - connect(list->list, SIGNAL(menuChanged(struct menu *)),
507 - info, SLOT(setInfo(struct menu *)));
508 - connect(list->list, SIGNAL(menuChanged(struct menu *)),
509 - parent, SLOT(setMenuLink(struct menu *)));
510 + connect(list->list, SIGNAL(menuChanged(KCMenu *)),
511 + info, SLOT(setInfo(KCMenu *)));
512 + connect(list->list, SIGNAL(menuChanged(KCMenu *)),
513 + parent, SLOT(setMenuLink(KCMenu *)));
514
515 layout1->addWidget(split);
516
517 @@ -1222,7 +1233,7 @@ ConfigSearchWindow::ConfigSearchWindow(C
518 y = configSettings->readNumEntry("/window y", 0, &ok);
519 if (ok)
520 move(x, y);
521 - QValueList<int> sizes = configSettings->readSizes("/split", &ok);
522 + Q3ValueList<int> sizes = configSettings->readSizes("/split", &ok);
523 if (ok)
524 split->setSizes(sizes);
525 configSettings->endGroup();
526 @@ -1309,60 +1320,60 @@ ConfigMainWindow::ConfigMainWindow(void)
527 configList->setFocus();
528
529 menu = menuBar();
530 - toolBar = new QToolBar("Tools", this);
531 + toolBar = new Q3ToolBar("Tools", this);
532
533 - backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this);
534 + backAction = new QAction(QPixmap(xpm_back), _("Back"), this);
535 connect(backAction, SIGNAL(activated()), SLOT(goBack()));
536 backAction->setEnabled(FALSE);
537 - QAction *quitAction = new QAction("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this);
538 + QAction *quitAction = new QAction(_("&Quit"), Qt::CTRL + Qt::Key_Q, this, 0);
539 connect(quitAction, SIGNAL(activated()), SLOT(close()));
540 - QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this);
541 + QAction *loadAction = new QAction(QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this, 0);
542 connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
543 - saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this);
544 + saveAction = new QAction(QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this, 0);
545 connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
546 conf_set_changed_callback(conf_changed);
547 // Set saveAction's initial state
548 conf_changed();
549 - QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this);
550 + QAction *saveAsAction = new QAction(_("Save &As..."), 0, this, "Save As...");
551 connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
552 - QAction *searchAction = new QAction("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this);
553 + QAction *searchAction = new QAction(_("&Find"), Qt::CTRL + Qt::Key_F, this, "Find");
554 connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
555 - QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
556 + QAction *singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), 0, this, "Single View");
557 connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
558 - QAction *splitViewAction = new QAction("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this);
559 + QAction *splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), 0, this, "Split View");
560 connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
561 - QAction *fullViewAction = new QAction("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this);
562 + QAction *fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), 0, this, "Full View");
563 connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
564
565 - QAction *showNameAction = new QAction(NULL, _("Show Name"), 0, this);
566 + QAction *showNameAction = new QAction(_("Show Name"), 0, this, 0);
567 showNameAction->setToggleAction(TRUE);
568 connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
569 connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
570 showNameAction->setOn(configView->showName());
571 - QAction *showRangeAction = new QAction(NULL, _("Show Range"), 0, this);
572 + QAction *showRangeAction = new QAction(_("Show Range"), 0, this, 0);
573 showRangeAction->setToggleAction(TRUE);
574 connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
575 connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
576 showRangeAction->setOn(configList->showRange);
577 - QAction *showDataAction = new QAction(NULL, _("Show Data"), 0, this);
578 + QAction *showDataAction = new QAction(_("Show Data"), 0, this, 0);
579 showDataAction->setToggleAction(TRUE);
580 connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
581 connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
582 showDataAction->setOn(configList->showData);
583 - QAction *showAllAction = new QAction(NULL, _("Show All Options"), 0, this);
584 + QAction *showAllAction = new QAction(_("Show All Options"), 0, this, 0);
585 showAllAction->setToggleAction(TRUE);
586 connect(showAllAction, SIGNAL(toggled(bool)), configView, SLOT(setShowAll(bool)));
587 connect(showAllAction, SIGNAL(toggled(bool)), menuView, SLOT(setShowAll(bool)));
588 showAllAction->setOn(configList->showAll);
589 - QAction *showDebugAction = new QAction(NULL, _("Show Debug Info"), 0, this);
590 + QAction *showDebugAction = new QAction(_("Show Debug Info"), 0, this, 0);
591 showDebugAction->setToggleAction(TRUE);
592 connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
593 connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
594 showDebugAction->setOn(helpText->showDebug());
595
596 - QAction *showIntroAction = new QAction(NULL, _("Introduction"), 0, this);
597 + QAction *showIntroAction = new QAction(_("Introduction"), 0, this, 0);
598 connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
599 - QAction *showAboutAction = new QAction(NULL, _("About"), 0, this);
600 + QAction *showAboutAction = new QAction(_("About"), 0, this, 0);
601 connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
602
603 // init tool bar
604 @@ -1376,7 +1387,7 @@ ConfigMainWindow::ConfigMainWindow(void)
605 fullViewAction->addTo(toolBar);
606
607 // create config menu
608 - QPopupMenu* config = new QPopupMenu(this);
609 + Q3PopupMenu* config = new Q3PopupMenu(this);
610 menu->insertItem(_("&File"), config);
611 loadAction->addTo(config);
612 saveAction->addTo(config);
613 @@ -1385,12 +1396,12 @@ ConfigMainWindow::ConfigMainWindow(void)
614 quitAction->addTo(config);
615
616 // create edit menu
617 - QPopupMenu* editMenu = new QPopupMenu(this);
618 + Q3PopupMenu* editMenu = new Q3PopupMenu(this);
619 menu->insertItem(_("&Edit"), editMenu);
620 searchAction->addTo(editMenu);
621
622 // create options menu
623 - QPopupMenu* optionMenu = new QPopupMenu(this);
624 + Q3PopupMenu* optionMenu = new Q3PopupMenu(this);
625 menu->insertItem(_("&Option"), optionMenu);
626 showNameAction->addTo(optionMenu);
627 showRangeAction->addTo(optionMenu);
628 @@ -1400,31 +1411,31 @@ ConfigMainWindow::ConfigMainWindow(void)
629 showDebugAction->addTo(optionMenu);
630
631 // create help menu
632 - QPopupMenu* helpMenu = new QPopupMenu(this);
633 + Q3PopupMenu* helpMenu = new Q3PopupMenu(this);
634 menu->insertSeparator();
635 menu->insertItem(_("&Help"), helpMenu);
636 showIntroAction->addTo(helpMenu);
637 showAboutAction->addTo(helpMenu);
638
639 - connect(configList, SIGNAL(menuChanged(struct menu *)),
640 - helpText, SLOT(setInfo(struct menu *)));
641 - connect(configList, SIGNAL(menuSelected(struct menu *)),
642 - SLOT(changeMenu(struct menu *)));
643 + connect(configList, SIGNAL(menuChanged(KCMenu *)),
644 + helpText, SLOT(setInfo(KCMenu *)));
645 + connect(configList, SIGNAL(menuSelected(KCMenu *)),
646 + SLOT(changeMenu(KCMenu *)));
647 connect(configList, SIGNAL(parentSelected()),
648 SLOT(goBack()));
649 - connect(menuList, SIGNAL(menuChanged(struct menu *)),
650 - helpText, SLOT(setInfo(struct menu *)));
651 - connect(menuList, SIGNAL(menuSelected(struct menu *)),
652 - SLOT(changeMenu(struct menu *)));
653 -
654 - connect(configList, SIGNAL(gotFocus(struct menu *)),
655 - helpText, SLOT(setInfo(struct menu *)));
656 - connect(menuList, SIGNAL(gotFocus(struct menu *)),
657 - helpText, SLOT(setInfo(struct menu *)));
658 - connect(menuList, SIGNAL(gotFocus(struct menu *)),
659 + connect(menuList, SIGNAL(menuChanged(KCMenu *)),
660 + helpText, SLOT(setInfo(KCMenu *)));
661 + connect(menuList, SIGNAL(menuSelected(KCMenu *)),
662 + SLOT(changeMenu(KCMenu *)));
663 +
664 + connect(configList, SIGNAL(gotFocus(KCMenu *)),
665 + helpText, SLOT(setInfo(KCMenu *)));
666 + connect(menuList, SIGNAL(gotFocus(KCMenu *)),
667 + helpText, SLOT(setInfo(KCMenu *)));
668 + connect(menuList, SIGNAL(gotFocus(KCMenu *)),
669 SLOT(listFocusChanged(void)));
670 - connect(helpText, SIGNAL(menuSelected(struct menu *)),
671 - SLOT(setMenuLink(struct menu *)));
672 + connect(helpText, SIGNAL(menuSelected(KCMenu *)),
673 + SLOT(setMenuLink(KCMenu *)));
674
675 QString listMode = configSettings->readEntry("/listMode", "symbol");
676 if (listMode == "single")
677 @@ -1435,7 +1446,7 @@ ConfigMainWindow::ConfigMainWindow(void)
678 showSplitView();
679
680 // UI setup done, restore splitter positions
681 - QValueList<int> sizes = configSettings->readSizes("/split1", &ok);
682 + Q3ValueList<int> sizes = configSettings->readSizes("/split1", &ok);
683 if (ok)
684 split1->setSizes(sizes);
685
686 @@ -1446,7 +1457,7 @@ ConfigMainWindow::ConfigMainWindow(void)
687
688 void ConfigMainWindow::loadConfig(void)
689 {
690 - QString s = QFileDialog::getOpenFileName(conf_get_configname(), NULL, this);
691 + QString s = Q3FileDialog::getOpenFileName(conf_get_configname(), NULL, this);
692 if (s.isNull())
693 return;
694 if (conf_read(QFile::encodeName(s)))
695 @@ -1462,7 +1473,7 @@ void ConfigMainWindow::saveConfig(void)
696
697 void ConfigMainWindow::saveConfigAs(void)
698 {
699 - QString s = QFileDialog::getSaveFileName(conf_get_configname(), NULL, this);
700 + QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this);
701 if (s.isNull())
702 return;
703 if (conf_write(QFile::encodeName(s)))
704 @@ -1476,7 +1487,7 @@ void ConfigMainWindow::searchConfig(void
705 searchWindow->show();
706 }
707
708 -void ConfigMainWindow::changeMenu(struct menu *menu)
709 +void ConfigMainWindow::changeMenu(KCMenu *menu)
710 {
711 configList->setRootMenu(menu);
712 if (configList->rootEntry->parent == &rootmenu)
713 @@ -1485,9 +1496,9 @@ void ConfigMainWindow::changeMenu(struct
714 backAction->setEnabled(TRUE);
715 }
716
717 -void ConfigMainWindow::setMenuLink(struct menu *menu)
718 +void ConfigMainWindow::setMenuLink(KCMenu *menu)
719 {
720 - struct menu *parent;
721 + KCMenu *parent;
722 ConfigList* list = NULL;
723 ConfigItem* item;
724
725 @@ -1690,9 +1701,9 @@ void ConfigMainWindow::conf_changed(void
726 saveAction->setEnabled(conf_get_changed());
727 }
728
729 -void fixup_rootmenu(struct menu *menu)
730 +void fixup_rootmenu(KCMenu *menu)
731 {
732 - struct menu *child;
733 + KCMenu *child;
734 static int menu_cnt = 0;
735
736 menu->flags |= MENU_ROOT;

  ViewVC Help
Powered by ViewVC 1.1.20