Commit a3c1034f authored by Michal Humpula's avatar Michal Humpula

try to fix filetreemodel listMode tests

parent c6315f7e
......@@ -567,9 +567,6 @@ void FileTreeModelTest::buildTreeFullPath()
qDeleteAll(documents);
}
// fails on build.kde.org, we need a way to fix that
#if 0
void FileTreeModelTest::listMode_data()
{
QTest::addColumn<QList<DummyDocument *>>("documents");
......@@ -631,8 +628,6 @@ void FileTreeModelTest::listMode()
qDeleteAll(documents);
}
#endif
void FileTreeModelTest::deleteDocument_data()
{
QTest::addColumn<QList<DummyDocument *>>("documents");
......
......@@ -45,10 +45,8 @@ class FileTreeModelTest : public QObject
void buildTreeBatchPrefill_data();
void buildTreeBatchPrefill();
#if 0
void listMode_data();
void listMode();
#endif
void deleteDocument_data();
void deleteDocument();
......
......@@ -438,7 +438,7 @@ void KateFileTreeModel::clearModel()
// remove all items
// can safely ignore documentClosed here
beginRemoveRows(QModelIndex(), 0, m_root->childCount() - 1);
beginRemoveRows(QModelIndex(), 0, qMax(m_root->childCount() - 1, 0));
delete m_root;
m_root = new ProxyItemDir(QLatin1String("m_root"), 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment