Commit 36080647 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Check if projectplugin is available before querying projectBaseDir

parent f6df3f8b
...@@ -73,7 +73,7 @@ void KateQuickOpenModel::refresh() ...@@ -73,7 +73,7 @@ void KateQuickOpenModel::refresh()
const QList<KTextEditor::View *> sortedViews = m_mainWindow->viewManager()->sortedViews(); const QList<KTextEditor::View *> sortedViews = m_mainWindow->viewManager()->sortedViews();
const QList<KTextEditor::Document *> openDocs = KateApp::self()->documentManager()->documentList(); const QList<KTextEditor::Document *> openDocs = KateApp::self()->documentManager()->documentList();
const QStringList projectDocs = projectView ? (m_listMode == CurrentProject ? projectView->property("projectFiles") : projectView->property("allProjectsFiles")).toStringList() : QStringList(); const QStringList projectDocs = projectView ? (m_listMode == CurrentProject ? projectView->property("projectFiles") : projectView->property("allProjectsFiles")).toStringList() : QStringList();
const QString projectBase = m_listMode == CurrentProject ? projectView->property("projectBaseDir").toString() : projectView->property("allProjectsCommonBaseDir").toString(); const QString projectBase = projectView ? (m_listMode == CurrentProject ? projectView->property("projectBaseDir") : projectView->property("allProjectsCommonBaseDir")).toString() : QString();
QVector<ModelEntry> allDocuments; QVector<ModelEntry> allDocuments;
allDocuments.reserve(sortedViews.size() + openDocs.size() + projectDocs.size()); allDocuments.reserve(sortedViews.size() + openDocs.size() + projectDocs.size());
......
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