diff --git a/kmail/kmlaunchexternalcomponent.cpp b/kmail/kmlaunchexternalcomponent.cpp index bdc9693ba8df6d1b1da99e765d0165a01db3c85d..963e52ced126f3653b56fc1177e14e72c71104de 100644 --- a/kmail/kmlaunchexternalcomponent.cpp +++ b/kmail/kmlaunchexternalcomponent.cpp @@ -121,5 +121,13 @@ void KMLaunchExternalComponent::slotImport() void KMLaunchExternalComponent::slotAccountWizard() { - KMail::Util::launchAccountWizard( mParentWidget ); + QStringList lst; + lst.append( QLatin1String("--type") ); + lst.append( QLatin1String("message/rfc822") ); + + const QString path = KStandardDirs::findExe( QLatin1String("accountwizard" ) ); + if( !QProcess::startDetached( path, lst ) ) + KMessageBox::error( mParentWidget, i18n( "Could not start the account wizard. " + "Please check your installation." ), + i18n( "Unable to start account wizard" ) ); } diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp index 8adebe50393d9ca3bbe70fbba3a1bfe310876321..fa965384859616c5c14f2f7ca90cb15cec25aac6 100644 --- a/kmail/kmmainwidget.cpp +++ b/kmail/kmmainwidget.cpp @@ -325,10 +325,10 @@ KMMainWidget::KMMainWidget( QWidget *parent, KXMLGUIClient *aGUIClient, i18n( "Unable to start import wizard" ) ); } } else { - KMail::Util::launchAccountWizard( this ); + mLaunchExternalComponent->slotAccountWizard(); } } else { - KMail::Util::launchAccountWizard( this ); + mLaunchExternalComponent->slotAccountWizard(); } } // must be the last line of the constructor: diff --git a/kmail/util.cpp b/kmail/util.cpp index f104c738b659f5d0e4268bd11f1ef5de1433aace..943024fa68ab549a73cb150394be0b5b8f73f103 100644 --- a/kmail/util.cpp +++ b/kmail/util.cpp @@ -85,20 +85,6 @@ Akonadi::Item::Id KMail::Util::putRepliesInSameFolder( const Akonadi::Item& item return -1; } -void KMail::Util::launchAccountWizard( QWidget *w ) -{ - QStringList lst; - lst.append( QLatin1String("--type") ); - lst.append( QLatin1String("message/rfc822") ); - - const QString path = KStandardDirs::findExe( QLatin1String("accountwizard" ) ); - if( !QProcess::startDetached( path, lst ) ) - KMessageBox::error( w, i18n( "Could not start the account wizard. " - "Please check your installation." ), - i18n( "Unable to start account wizard" ) ); - -} - bool KMail::Util::handleClickedURL( const KUrl &url, const QSharedPointer &folder ) { if ( url.protocol() == QLatin1String( "mailto" ) ) { diff --git a/kmail/util.h b/kmail/util.h index 0bbbdaa1f61af474faf99bd8da72a9f8a6fc6238..64cd22fe31a8694bea108116bdd099da24f86cc3 100644 --- a/kmail/util.h +++ b/kmail/util.h @@ -79,8 +79,6 @@ KMime::Types::Mailbox::List mailingListsFromMessage( const Akonadi::Item& item ) */ Akonadi::Item::Id putRepliesInSameFolder( const Akonadi::Item& item ); -void launchAccountWizard( QWidget * ); - /** * Handles a clicked URL, but only in case the viewer didn't handle it. * Currently only support mailto.