提交 924bbb53 编写于 作者: B Boris Barbulovski 提交者: Michal Marek

Port xconfig to Qt5 - Use QTextBrowser

Signed-off-by: NBoris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: NThiago Macieira <thiago.macieira@intel.com>
Signed-off-by: NMichal Marek <mmarek@suse.com>
上级 041fbdc2
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <QMainWindow> #include <QMainWindow>
#include <q3vbox.h> #include <q3vbox.h>
#include <QList> #include <QList>
#include <q3textbrowser.h> #include <qtextbrowser.h>
#include <QAction> #include <QAction>
#include <q3header.h> #include <q3header.h>
#include <QFileDialog> #include <QFileDialog>
...@@ -1154,22 +1154,22 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char ...@@ -1154,22 +1154,22 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
*text += str2; *text += str2;
} }
Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos) QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
{ {
Q3PopupMenu* popup = Parent::createPopupMenu(pos); QMenu* popup = Parent::createStandardContextMenu(pos);
QAction* action = new QAction(_("Show Debug Info"), popup); QAction* action = new QAction(_("Show Debug Info"), popup);
action->setToggleAction(TRUE); action->setToggleAction(TRUE);
connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
action->setOn(showDebug()); action->setOn(showDebug());
popup->insertSeparator(); popup->addSeparator();
action->addTo(popup); action->addTo(popup);
return popup; return popup;
} }
void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e) void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
{ {
Parent::contentsContextMenuEvent(e); Parent::contextMenuEvent(e);
} }
ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
......
...@@ -232,9 +232,9 @@ public slots: ...@@ -232,9 +232,9 @@ public slots:
static QAction *showPromptAction; static QAction *showPromptAction;
}; };
class ConfigInfoView : public Q3TextBrowser { class ConfigInfoView : public QTextBrowser {
Q_OBJECT Q_OBJECT
typedef class Q3TextBrowser Parent; typedef class QTextBrowser Parent;
public: public:
ConfigInfoView(QWidget* parent, const char *name = 0); ConfigInfoView(QWidget* parent, const char *name = 0);
bool showDebug(void) const { return _showDebug; } bool showDebug(void) const { return _showDebug; }
...@@ -254,8 +254,8 @@ public slots: ...@@ -254,8 +254,8 @@ public slots:
QString debug_info(struct symbol *sym); QString debug_info(struct symbol *sym);
static QString print_filter(const QString &str); static QString print_filter(const QString &str);
static void expr_print_help(void *data, struct symbol *sym, const char *str); static void expr_print_help(void *data, struct symbol *sym, const char *str);
Q3PopupMenu* createPopupMenu(const QPoint& pos); QMenu *createStandardContextMenu(const QPoint & pos);
void contentsContextMenuEvent(QContextMenuEvent *e); void contextMenuEvent(QContextMenuEvent *e);
struct symbol *sym; struct symbol *sym;
struct menu *_menu; struct menu *_menu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册