ui: force refresh option in menu for reloading whole project

This commit is contained in:
Eberhard Graether
2015-09-23 16:44:39 +02:00
parent 502909c789
commit bb3a8bf351
11 changed files with 62 additions and 22 deletions
-2
View File
@@ -830,9 +830,7 @@ void QtSmartSearchBox::hideAutoCompletions()
completer()->popup()->hide();
}
// #include "data/query/QueryTree.h"
std::deque<SearchMatch> QtSmartSearchBox::getMatchesForInput(const std::string& text) const
{
// return SearchMatch::stringDequeToSearchMatchDeque(QueryTree::tokenizeQuery(text));
return std::deque<SearchMatch>(1, SearchMatch(text));
}
+16
View File
@@ -6,6 +6,7 @@
#include <QMenuBar>
#include <QMessageBox>
#include <QSettings>
#include <QSysInfo>
#include "component/view/View.h"
#include "component/view/CompositeView.h"
@@ -329,6 +330,11 @@ void QtMainWindow::refresh()
MessageRefresh().dispatch();
}
void QtMainWindow::forceRefresh()
{
MessageRefresh().refreshAll().dispatch();
}
void QtMainWindow::saveProject()
{
MessageSaveProject("").dispatch();
@@ -434,6 +440,16 @@ void QtMainWindow::setupEditMenu()
menu->addSeparator();
menu->addAction(tr("&Refresh"), this, SLOT(refresh()), QKeySequence::Refresh);
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
{
menu->addAction(tr("&Force Refresh"), this, SLOT(forceRefresh()), QKeySequence(Qt::SHIFT + Qt::Key_F5));
}
else
{
menu->addAction(tr("&Force Refresh"), this, SLOT(forceRefresh()), QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_R));
}
menu->addAction(tr("&Find"), this, SLOT(find()), QKeySequence::Find);
}
+1
View File
@@ -70,6 +70,7 @@ public slots:
void find();
void closeWindow();
void refresh();
void forceRefresh();
void saveProject();
void saveAsProject();