addList(list);
connect(list, SIGNAL(activated(const QModelIndex &)),
this, SLOT(onItemActivated(const QModelIndex &)));
-
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN)
- addAction(tr("Close"), this, SLOT(close()), QString(),
- QDialogButtonBox::RejectRole);
-#endif // Q_WS_MAEMO_5
}
void ChaptersDialog::onItemActivated(const QModelIndex &index)
* Fix TOC in "The Awakening" (and possibly other Google books) [#6318]
* Works on Symbian (far from usable)
+ * Make modal dialogs closeable on Mac
-- Akos Polster <akos@pipacs.com> Thu, 16 Sep 2010 02:00:00 +0200
content->show();
scroller->setWidgetResizable(true);
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN)
QAction *closeAction = new QAction(tr("Back"), this);
closeAction->setSoftKeyRole(QAction::NegativeSoftKey);
connect(closeAction, SIGNAL(triggered()), this, SLOT(reject()));
setCentralWidget(frame);
contentLayout = new QHBoxLayout();
frame->setLayout(contentLayout);
-#ifdef 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
+# else
buttonBox = new QDialogButtonBox(Qt::Vertical, this);
contentLayout->addWidget(buttonBox);
-#endif // Q_OS_SYMBIAN
+# endif // Q_OS_SYMBIAN
#endif // Q_WS_MAEMO_5
+
+#ifdef Q_WS_MAC
+ addAction(tr("Close"), this, SLOT(close()), QString(),
+ QDialogButtonBox::RejectRole);
+#endif // Q_WS_MAC
}
void ListWindow::addList(ListView *listView)
const char *slot)
{
Trace t("ListWindow::addItemAction");
-#ifdef Q_WS_MAEMO
+#ifdef Q_WS_MAEMO_5
popup->addAction(title, receiver, slot);
#elif defined Q_OS_SYMBIAN
QAction *action = new QAction(title, this);