namespace The {
- QMap<QString, QAction*>* globalActions() {
- static QMap<QString, QAction*> *g_actions = 0;
- if (!g_actions)
- g_actions = new QMap<QString, QAction*>;
- return g_actions;
+ QHash<QString, QAction*>* globalActions() {
+ static QHash<QString, QAction*> *actions = new QHash<QString, QAction*>;
+ return actions;
}
- QMap<QString, QMenu*>* globalMenus() {
- static QMap<QString, QMenu*> *g_menus = 0;
- if (!g_menus)
- g_menus = new QMap<QString, QMenu*>;
- return g_menus;
+ QHash<QString, QMenu*>* globalMenus() {
+ static QHash<QString, QMenu*> *menus = new QHash<QString, QMenu*>;
+ return menus;
}
void maybeSetSystemProxy() {
}
NetworkAccess* http() {
- static NetworkAccess *g_http = new NetworkAccess();
- return g_http;
+ static NetworkAccess *na = new NetworkAccess();
+ return na;
}
}
#endif
namespace The {
-QMap<QString, QAction*>* globalActions();
+QHash<QString, QAction*>* globalActions();
}
RefineSearchWidget::RefineSearchWidget(QWidget *parent) :
QString paramName = bar->property("paramName").toString();
QVariant paramValue = action->property("paramValue");
- qDebug() << "param changed" << paramName << paramValue;
+ // qDebug() << "param changed" << paramName << paramValue;
emit paramChanged(paramName, paramValue);
- qDebug() << __PRETTY_FUNCTION__;
dirty = true;
}
void RefineSearchWidget::setSearchParams(SearchParams *params) {
setup();
+ qDebug() << (params != 0);
+
The::globalActions()->value("refine-search")->setEnabled(params);
setEnabled(params);
#endif
namespace The {
-QMap<QString, QAction*>* globalActions();
+QHash<QString, QAction*>* globalActions();
}
SidebarWidget::SidebarWidget(QWidget *parent) :
#include "mainwindow.h"
namespace The {
-QMap<QString, QAction*>* globalActions();
+QHash<QString, QAction*>* globalActions();
}
static const int cols = 5;