summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-07-25 02:38:01 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-07-25 02:38:01 +0200
commit2b0ab580b3eb16900228375908581254327d7ad7 (patch)
tree269e621b2dbf702121e7f7a41716346a6e6b8aa6
parentUpdated TODO (diff)
downloadrekonq-2b0ab580b3eb16900228375908581254327d7ad7.tar.xz
Fixing history menu
-rw-r--r--TODO4
-rw-r--r--src/history.cpp1
-rw-r--r--src/modelmenu.cpp28
3 files changed, 8 insertions, 25 deletions
diff --git a/TODO b/TODO
index 5a84c166..1c33d9a6 100644
--- a/TODO
+++ b/TODO
@@ -15,4 +15,6 @@ TO 0.2 release
- error pages (timeout loading)
- proxy DNS requests ??
- no more KDEnetwork!!
-- no reKonfig in loadUrl \ No newline at end of file
+- no reKonfig in loadUrl
+- history menu
+- clear private data
diff --git a/src/history.cpp b/src/history.cpp
index d67e65d0..3c63cb4e 100644
--- a/src/history.cpp
+++ b/src/history.cpp
@@ -1330,4 +1330,3 @@ void HistoryTreeModel::sourceRowsRemoved(const QModelIndex &parent, int start, i
endRemoveRows();
}
}
-
diff --git a/src/modelmenu.cpp b/src/modelmenu.cpp
index 41c197f3..1aa5be16 100644
--- a/src/modelmenu.cpp
+++ b/src/modelmenu.cpp
@@ -155,15 +155,6 @@ void ModelMenu::createMenu(const QModelIndex &parent, int max, QMenu *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()));
return;
}
@@ -177,20 +168,11 @@ 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_separatorRole != 0
- && idx.data(m_separatorRole).toBool())
- addSeparator();
- else
- menu->addAction(makeAction(idx));
-// }
- if (menu == this && i == m_firstSeparator - 1)
- addSeparator();
+
+ if( !m_model->hasChildren(idx) && ( m_separatorRole == 0 || !idx.data(m_separatorRole).toBool() ) )
+ {
+ menu->addAction(makeAction(idx));
+ }
}
}