Git commit d484040b2d5630a698b4f373d3aa5eacb71089e1 by Shantanu Tushar. Committed on 02/07/2012 at 16:51. Pushed by shantanu into branch 'master'. Add empty list message M +6 -0 active/qml/RecentFiles.qml M +3 -5 active/src/MainWindow.cpp http://commits.kde.org/calligra/d484040b2d5630a698b4f373d3aa5eacb71089e1 diff --git a/active/qml/RecentFiles.qml b/active/qml/RecentFiles.qml index 8b169ec..1d904fc 100644 --- a/active/qml/RecentFiles.qml +++ b/active/qml/RecentFiles.qml @@ -71,5 +71,11 @@ ListView { metadataModel.filterRegExp =3D ""; } } + + PlasmaComponents.Label { + text: "No files here" + anchors.centerIn: parent + visible: recentFilesListView.count =3D=3D 0 && typeFilter !=3D "" + } } = diff --git a/active/src/MainWindow.cpp b/active/src/MainWindow.cpp index e92d9d3..99309ca 100644 --- a/active/src/MainWindow.cpp +++ b/active/src/MainWindow.cpp @@ -86,7 +86,9 @@ MainWindow::MainWindow (QWidget* parent) connect (m_view, SIGNAL (sceneResized (QSize)), SLOT (adjustWindowSize= (QSize))); resize (800, 600); = - QTimer::singleShot(1000, this, SLOT(checkForAndOpenDocument())); + if (!documentPath.isEmpty()) { + QTimer::singleShot(1000, this, SLOT(checkForAndOpenDocument())); + } } = void MainWindow::openFile (const QString& path) @@ -132,10 +134,6 @@ MainWindow::~MainWindow() = void MainWindow::checkForAndOpenDocument() { - if (documentPath.isEmpty()) { - return; - } - QObject* object =3D m_view->rootObject(); QMetaObject::invokeMethod (object, "openDocument", Q_ARG (QVariant, QV= ariant (documentPath))); }