[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdepim/blogilo/src
From: Golnaz Nilieh <g382nilieh () gmail ! com>
Date: 2010-01-09 22:50:16
Message-ID: 1263077416.018008.12265.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1072318 by golnazn:
When no blog is selected in the toolbar, "Open in browser" does nothing to avoid crash.
M +10 -5 mainwindow.cpp
--- branches/KDE/4.4/kdepim/blogilo/src/mainwindow.cpp #1072317:1072318
@@ -649,11 +649,16 @@
void MainWindow::slotOpenCurrentBlogInBrowser()
{
- KUrl url( DBMan::self()->blog( mCurrentBlogId ).blogUrl() );
- if(url.isValid())
- KToolInvocation::invokeBrowser(url.url());
- else
- KMessageBox::sorry(this, i18n("Cannot find current blog URL."));
+ if (mCurrentBlogId > -1)
+ {
+ KUrl url( DBMan::self()->blog( mCurrentBlogId ).blogUrl() );
+ if(url.isValid())
+ KToolInvocation::invokeBrowser(url.url());
+ else
+ KMessageBox::sorry(this, i18n("Cannot find current blog URL."));
+ }
+ ///TODO
+ ///else show a massege to the user saying that a blog should be selected before.
}
#include "mainwindow.moc"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic