Skip to content

Commit

Permalink
Port xconfig to Qt5 - Use QTextBrowser
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
  • Loading branch information
Boris Barbulovski authored and Michal Marek committed Oct 14, 2015
1 parent 041fbdc commit 924bbb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <QMainWindow>
#include <q3vbox.h>
#include <QList>
#include <q3textbrowser.h>
#include <qtextbrowser.h>
#include <QAction>
#include <q3header.h>
#include <QFileDialog>
Expand Down Expand Up @@ -1154,22 +1154,22 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
*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);
action->setToggleAction(TRUE);
connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
action->setOn(showDebug());
popup->insertSeparator();
popup->addSeparator();
action->addTo(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)
Expand Down
8 changes: 4 additions & 4 deletions scripts/kconfig/qconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ public slots:
static QAction *showPromptAction;
};

class ConfigInfoView : public Q3TextBrowser {
class ConfigInfoView : public QTextBrowser {
Q_OBJECT
typedef class Q3TextBrowser Parent;
typedef class QTextBrowser Parent;
public:
ConfigInfoView(QWidget* parent, const char *name = 0);
bool showDebug(void) const { return _showDebug; }
Expand All @@ -254,8 +254,8 @@ public slots:
QString debug_info(struct symbol *sym);
static QString print_filter(const QString &str);
static void expr_print_help(void *data, struct symbol *sym, const char *str);
Q3PopupMenu* createPopupMenu(const QPoint& pos);
void contentsContextMenuEvent(QContextMenuEvent *e);
QMenu *createStandardContextMenu(const QPoint & pos);
void contextMenuEvent(QContextMenuEvent *e);

struct symbol *sym;
struct menu *_menu;
Expand Down

0 comments on commit 924bbb5

Please sign in to comment.