[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/pim/kblogger/src
From: Christian Weilbach <christian () whiletaker ! homeip ! net>
Date: 2009-02-25 2:18:37
Message-ID: 1235528317.323705.31431.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 931259 by weilbach:
Fix some crashes due to wrong asserts and a yet to fix blog chosing option.
M +1 -0 backend/waitdialog.cpp
M +10 -4 composer/composer.cpp
M +3 -4 profiles/profilelist.cpp
--- trunk/playground/pim/kblogger/src/backend/waitdialog.cpp #931258:931259
@@ -57,6 +57,7 @@
void WaitDialog::jobDone()
{
kDebug();
+ kDebug() << "Widget Pointer: " << widget;
widget->jobDone();
}
--- trunk/playground/pim/kblogger/src/composer/composer.cpp #931258:931259
@@ -76,6 +76,13 @@
QDialog(parent)
{
kDebug();
+
+ // TODO make blog actions transparent to blog choser
+ if (blogname.isEmpty()){
+ KMessageBox::error(this,i18n("Please select a blog first."),
+ i18n("Cannot create post without a blog."));
+ return;
+ }
mPostToModify = 0;
initialize();
setBlogname(blogname);
@@ -97,7 +104,7 @@
if ( blogname.isEmpty() ){
return;
}
-
+
for ( int i = 0; mBlogChooser->blogCombo->count(); ++i ) {
if ( blogname == mBlogChooser->blogCombo->itemText(i) ) {
mBlogChooser->blogCombo->setCurrentIndex(i);
@@ -161,13 +168,12 @@
QStringList categories=post->categories();
//Set First Category
- {
- Q_ASSERT(CategoryComboBox->count());
+ if(CategoryComboBox->count()){
int index;
QString category;
category=categories.takeFirst();
index=CategoryComboBox->findText(category);
-
+
if (index != -1) //Category found
CategoryComboBox->setCurrentIndex(index);
}
--- trunk/playground/pim/kblogger/src/profiles/profilelist.cpp #931258:931259
@@ -88,17 +88,16 @@
QString(), 0, this, validator);
kDebug() << newAccount << endl;
+ if( newAccount.isEmpty() ) return;
+
// check if the account name exists already
QList<QTreeWidgetItem*> list = ProfileListTree->findItems(newAccount,Qt::MatchExactly);
if( !list.isEmpty() ){
- kDebug() << "don not try to add accounts twice";
+ kDebug() << "do not try to add accounts twice";
KMessageBox::error( this, i18n("This profile exists already.") );
return;
}
- // this should never happen as long as testRegExp is set correctly
- Q_ASSERT( !newAccount.isEmpty() );
-
// add account to the tree list
QTreeWidgetItem *item = new QTreeWidgetItem(ProfileListTree, QStringList(newAccount));
ProfileListTree->addTopLevelItem(item);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic