From: Akos Polster Date: Sun, 26 Sep 2010 18:34:51 +0000 (+0200) Subject: More Symbian fixes. X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=91982ba06cca87105e1174e5e167c0b1771cf159;p=dorian More Symbian fixes. --- diff --git a/chaptersdialog.cpp b/chaptersdialog.cpp index 1aaffd3..85f0d92 100644 --- a/chaptersdialog.cpp +++ b/chaptersdialog.cpp @@ -23,7 +23,7 @@ ChaptersDialog::ChaptersDialog(Book *book, QWidget *parent): ListWindow(parent) connect(list, SIGNAL(activated(const QModelIndex &)), this, SLOT(onItemActivated(const QModelIndex &))); -#ifndef Q_WS_MAEMO_5 +#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN) addAction(tr("Close"), this, SLOT(close()), QString(), QDialogButtonBox::RejectRole); #endif // Q_WS_MAEMO_5 diff --git a/settingswindow.cpp b/settingswindow.cpp index f533e17..4bece61 100644 --- a/settingswindow.cpp +++ b/settingswindow.cpp @@ -132,6 +132,13 @@ SettingsWindow::SettingsWindow(QWidget *parent): QMainWindow(parent) this, SLOT(onSchemeButtonClicked(int))); connect(orientationBox, SIGNAL(buttonClicked(int)), this, SLOT(onOrientationButtonClicked(int))); + +#ifdef Q_OS_SYMBIAN + QAction *closeAction = new QAction(parent? tr("Back"): tr("Exit"), this); + closeAction->setSoftKeyRole(QAction::NegativeSoftKey); + connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); + QMainWindow::addAction(closeAction); +#endif } void SettingsWindow::onSliderValueChanged(int value) diff --git a/widgets/adopterwindow.cpp b/widgets/adopterwindow.cpp index 98aa51c..0c734c0 100644 --- a/widgets/adopterwindow.cpp +++ b/widgets/adopterwindow.cpp @@ -34,6 +34,7 @@ AdopterWindow::AdopterWindow(QWidget *parent): QAction *closeAction = new QAction(parent? tr("Back"): tr("Exit"), this); closeAction->setSoftKeyRole(QAction::NegativeSoftKey); connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); + QMainWindow::addAction(closeAction); #else // Tool bar setUnifiedTitleAndToolBarOnMac(true); @@ -120,6 +121,9 @@ void AdopterWindow::doGrabZoomKeys(bool grab) void AdopterWindow::show() { #ifdef Q_OS_SYMBIAN + foreach (QWidget *w, QApplication::allWidgets()) { + w->setContextMenuPolicy(Qt::NoContextMenu); + } showMaximized(); #else QMainWindow::show(); diff --git a/widgets/dyalog.cpp b/widgets/dyalog.cpp index 0e4d295..98ade66 100644 --- a/widgets/dyalog.cpp +++ b/widgets/dyalog.cpp @@ -99,12 +99,15 @@ void Dyalog::addButton(const QString &label, QObject *receiver, void Dyalog::show() { + foreach (QWidget *w, QApplication::allWidgets()) { + w->setContextMenuPolicy(Qt::NoContextMenu); + } showMaximized(); } int Dyalog::exec() { - showMaximized(); + show(); return QDialog::exec(); } diff --git a/widgets/listwindow.cpp b/widgets/listwindow.cpp index 9317aa6..2c6fcf1 100644 --- a/widgets/listwindow.cpp +++ b/widgets/listwindow.cpp @@ -31,7 +31,12 @@ ListWindow::ListWindow(QWidget *parent): QMainWindow(parent), list(0) setCentralWidget(frame); contentLayout = new QHBoxLayout(); frame->setLayout(contentLayout); -#ifndef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN + QAction *closeAction = new QAction(parent? tr("Back"): tr("Exit"), this); + closeAction->setSoftKeyRole(QAction::NegativeSoftKey); + connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); + QMainWindow::addAction(closeAction); +#else buttonBox = new QDialogButtonBox(Qt::Vertical, this); contentLayout->addWidget(buttonBox); #endif // Q_OS_SYMBIAN @@ -174,6 +179,9 @@ void ListWindow::onModelChanged() void ListWindow::show() { + foreach (QWidget *w, QApplication::allWidgets()) { + w->setContextMenuPolicy(Qt::NoContextMenu); + } showMaximized(); }