summaryrefslogtreecommitdiff
path: root/src/modelmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modelmenu.cpp')
-rw-r--r--src/modelmenu.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/modelmenu.cpp b/src/modelmenu.cpp
index 9ff37037..41c197f3 100644
--- a/src/modelmenu.cpp
+++ b/src/modelmenu.cpp
@@ -145,19 +145,25 @@ void ModelMenu::aboutToShow()
postPopulated();
}
+
+// WARNING
+// the code commented out here is to create a second separator in the history menu
+// with ALL history, subdivided by days.
void ModelMenu::createMenu(const QModelIndex &parent, int max, QMenu *parentMenu, QMenu *menu)
{
+ Q_UNUSED(parentMenu)
+
if (!menu)
{
- QString title = parent.data().toString();
- menu = new QMenu(title, this);
- QIcon icon = qvariant_cast<QIcon>(parent.data(Qt::DecorationRole));
- menu->setIcon(icon);
- parentMenu->addMenu(menu);
- QVariant v;
- v.setValue(parent);
- menu->menuAction()->setData(v);
- connect(menu, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
+// QString title = parent.data().toString();
+// menu = new QMenu(title, this);
+// QIcon icon = qvariant_cast<QIcon>(parent.data(Qt::DecorationRole));
+// menu->setIcon(icon);
+// parentMenu->addMenu(menu);
+// QVariant v;
+// v.setValue(parent);
+// menu->menuAction()->setData(v);
+// connect(menu, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
return;
}
@@ -171,18 +177,18 @@ void ModelMenu::createMenu(const QModelIndex &parent, int max, QMenu *parentMenu
for (int i = 0; i < end; ++i)
{
QModelIndex idx = m_model->index(i, 0, parent);
- if (m_model->hasChildren(idx))
- {
- createMenu(idx, -1, menu);
- }
- else
- {
+// if (m_model->hasChildren(idx))
+// {
+// createMenu(idx, -1, menu);
+// }
+// else
+// {
if (m_separatorRole != 0
&& idx.data(m_separatorRole).toBool())
addSeparator();
else
menu->addAction(makeAction(idx));
- }
+// }
if (menu == this && i == m_firstSeparator - 1)
addSeparator();
}