summaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2011-01-18 03:37:56 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2011-01-18 04:46:08 (GMT)
commit9ef953a65a96b511aae2a4ba6db9579b5d23cc29 (patch)
treedb5b41cd3d96fe66257b39497eca9ffb379dd237 /tools/qml
parentf503dc25886e556983fc1bf3efb2e15669f3507c (diff)
downloadQt-9ef953a65a96b511aae2a4ba6db9579b5d23cc29.zip
Qt-9ef953a65a96b511aae2a4ba6db9579b5d23cc29.tar.gz
Qt-9ef953a65a96b511aae2a4ba6db9579b5d23cc29.tar.bz2
Add a way to clear warnings in qmlviewer warnings window on Symbian
Basically by adding a clear soft key to the currently empty right soft key in warninng window in qmlviewer. Task-number: Reviewed-by: Martin Jones
Diffstat (limited to 'tools/qml')
-rw-r--r--tools/qml/loggerwidget.cpp5
-rw-r--r--tools/qml/qmlruntime.cpp4
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp
index fb4fedc..e167c94 100644
--- a/tools/qml/loggerwidget.cpp
+++ b/tools/qml/loggerwidget.cpp
@@ -67,6 +67,11 @@ LoggerWidget::LoggerWidget(QWidget *parent) :
m_plainTextEdit = new QPlainTextEdit();
#if defined(Q_OS_SYMBIAN)
+ QAction* clearAction = new QAction(tr("Clear"), this);
+ clearAction->setSoftKeyRole(QAction::PositiveSoftKey);
+ connect(clearAction, SIGNAL(triggered()), m_plainTextEdit, SLOT(clear()));
+ addAction(clearAction);
+
m_plainTextEdit->setReadOnly(true);
QAction* backAction = new QAction( tr("Back"), this );
backAction->setSoftKeyRole( QAction::NegativeSoftKey );
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 31bb73b..586eaa5 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -781,9 +781,11 @@ void QDeclarativeViewer::createMenu()
aboutAction->setMenuRole(QAction::AboutQtRole);
connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+#if !defined(Q_OS_SYMBIAN)
QAction *closeAction = new QAction(tr("&Close"), this);
closeAction->setShortcuts(QKeySequence::Close);
connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
+#endif
QAction *quitAction = new QAction(tr("&Quit"), this);
quitAction->setMenuRole(QAction::QuitRole);
@@ -819,9 +821,9 @@ void QDeclarativeViewer::createMenu()
fileMenu->addAction(openAction);
fileMenu->addAction(openUrlAction);
fileMenu->addAction(reloadAction);
+#if !defined(Q_OS_SYMBIAN)
fileMenu->addSeparator();
fileMenu->addAction(closeAction);
-#if !defined(Q_OS_SYMBIAN)
fileMenu->addAction(quitAction);
QMenu *recordMenu = menu->addMenu(tr("&Recording"));