Summary: | kleopatra displays an empty white screen after starting. | ||
---|---|---|---|
Product: | KDE PIM Mobile | Reporter: | Ludwig Reiter <ludwig.reiter> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | adam |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Windows CE | ||
OS: | Microsoft Windows CE | ||
Latest Commit: | Version Fixed In: |
Description
Ludwig Reiter
2010-12-23 10:50:39 UTC
Not reproducible with current versions. Please re-test. retested with 2011-01-03 (git-fd19a2b) If I start Kleopatra mobile from the start menu, I see a white window with an actions flap and the windows switch icon. I would expect a certificate list header, because I haven't entered any cert., yet. commit e7a57d6b9883b765cbde1ddc2949c7d15c371c22 branch master Author: Tobias Koenig <tokoe@kde.org> Date: Thu Jan 13 12:28:52 2011 +0100 Show a text if no certificates are loaded yet BUG: 261054 diff --git a/kleopatra/mainwindow_mobile.cpp b/kleopatra/mainwindow_mobile.cpp index a44fe3e..e4cf2ab 100644 --- a/kleopatra/mainwindow_mobile.cpp +++ b/kleopatra/mainwindow_mobile.cpp @@ -308,6 +308,15 @@ void MainWindow::registerKeyTreeView( KeyTreeView * view ) { d->controller.setCurrentView( v ); d->keyTreeView = view; d->tryToConnectSearchBarToKeyTreeView(); + + connect( v->model(), SIGNAL( rowsInserted( QModelIndex, int, int ) ), + SIGNAL( certificatesAvailabilityChanged() ) ); + connect( v->model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ), + SIGNAL( certificatesAvailabilityChanged() ) ); + connect( v->model(), SIGNAL( modelReset() ), + SIGNAL( certificatesAvailabilityChanged() ) ); + + emit certificatesAvailabilityChanged(); } void MainWindow::registerSearchBar( SearchBar * bar ) { @@ -382,5 +391,9 @@ void MainWindow::Private::slotSearchBarTextChanged( const QString & text ) { } } +bool MainWindow::certificatesAvailable() const { + return (d->keyTreeView && d->keyTreeView->view()->model()->rowCount()); +} + #include "moc_mainwindow_mobile.cpp" #include "mainwindow_mobile.moc" diff --git a/kleopatra/mainwindow_mobile.h b/kleopatra/mainwindow_mobile.h index ecc895f..62b86f2 100644 --- a/kleopatra/mainwindow_mobile.h +++ b/kleopatra/mainwindow_mobile.h @@ -46,13 +46,19 @@ class QStringList; class MainWindow : public KDeclarativeFullScreenView { Q_OBJECT + Q_PROPERTY( bool certificatesAvailable READ certificatesAvailable NOTIFY certificatesAvailabilityChanged ) public: explicit MainWindow( QWidget * parent=0 ); ~MainWindow(); + bool certificatesAvailable() const; + public Q_SLOTS: void importCertificatesFromFile( const QStringList & files ); +Q_SIGNALS: + void certificatesAvailabilityChanged(); + protected: /* reimp */ void doDelayedInit(); /* reimp */ void closeEvent( QCloseEvent * ); diff --git a/kleopatra/qml/kleopatra-mobile.qml b/kleopatra/qml/kleopatra-mobile.qml index b5fc8e4..2417a93 100644 --- a/kleopatra/qml/kleopatra-mobile.qml +++ b/kleopatra/qml/kleopatra-mobile.qml @@ -63,6 +63,15 @@ KPIM.MainView { y : height == 0 ? parent.height : parent.height - height } + QML.Rectangle { + anchors.fill : parent + visible : !application.certificatesAvailable + + QML.Text { + text : KDE.i18n( "No certificates loaded yet." ); + anchors.centerIn : parent + } + } } SlideoutPanelContainer { test of Description version 2011-01-16 git-4d1bc61 With the no cert loaded text, it is ok. Closed |