#endif
}
-void MainWindow::showHistory() {
- HistoryListDialog historyDialog(backbone->history()->list(), this);
+void MainWindow::showHistory(QPoint p) {
+ HistoryListDialog historyDialog(backbone->history()->list(), searchBarWidget);
+
+ #ifndef Q_WS_MAEMO_5
+ QPoint newPos = mapFromGlobal(p);
+ newPos.setY(searchBarWidget->pos().y() -
+ historyDialog.sizeHint().height());
+ newPos.setX(width() - historyDialog.sizeHint().width());
+
+ historyDialog.move(newPos);
+ #endif
+
if(historyDialog.exec() == QDialog::Accepted) {
backbone->history()->setCurrentElement(historyDialog.selectedRow());
searchExact(historyDialog.selectedWord());
connect(searchBarWidget, SIGNAL(historyPrev()),
this, SLOT(historyPrev()));
- connect(searchBarWidget, SIGNAL(historyShow()),
- this, SLOT(showHistory()));
+ connect(searchBarWidget, SIGNAL(historyShow(QPoint)),
+ this, SLOT(showHistory(QPoint)));
connect(searchBarWidget, SIGNAL(refreshHistoryButtons()),
backbone->history(), SLOT(refreshStatus()));