From kde-commits Tue Jan 08 08:18:30 2008 From: Marc Mutz Date: Tue, 08 Jan 2008 08:18:30 +0000 To: kde-commits Subject: Re: playground/pim/kblogger/src Message-Id: <200801081022.34550.marc () klaralvdalens-datakonsult ! se> X-MARC-Message: https://marc.info/?l=kde-commits&m=119978031028324 On Monday 07 January 2008 21:20, Christian Weilbach wrote: > +    if( kcfg_User->text().isEmpty() || > +         passwordLineEdit->text().isEmpty() || > +         kcfg_Url->text().isEmpty() ) { > + > +         kDebug()<< "fill in all relevant information first"; > +         KMessageBox::sorry( 0, > +              i18n("You need to set the username, password and url of your > blog.")); +         return; > +    } For usability, consider the following: if ( kcfg_User->text().isEmpty() ) { KMessageBox::sorry( ...username... ); // switch tabs, if applicable kcfg_User->setFocus(); return; } if ( passwordLineEdit->text().isEmpty() ) { KMessageBox::sorry( ... password.... ); // switch tabs, if applicable passwordLineEdit->setFocus(); return; } .... Thanks, Marc -- Marc Mutz -- marc@klaralvdalens-datakonsult.se, mutz@kde.org Klarälvdalens Datakonsult AB, Platform-independent software solutions