Commit 1dc2bea0 authored by Laurent Montel's avatar Laurent Montel 😁

not necessary to put in a static method

parent c0193473
...@@ -121,5 +121,13 @@ void KMLaunchExternalComponent::slotImport() ...@@ -121,5 +121,13 @@ void KMLaunchExternalComponent::slotImport()
void KMLaunchExternalComponent::slotAccountWizard() 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" ) );
} }
...@@ -325,10 +325,10 @@ KMMainWidget::KMMainWidget( QWidget *parent, KXMLGUIClient *aGUIClient, ...@@ -325,10 +325,10 @@ KMMainWidget::KMMainWidget( QWidget *parent, KXMLGUIClient *aGUIClient,
i18n( "Unable to start import wizard" ) ); i18n( "Unable to start import wizard" ) );
} }
} else { } else {
KMail::Util::launchAccountWizard( this ); mLaunchExternalComponent->slotAccountWizard();
} }
} else { } else {
KMail::Util::launchAccountWizard( this ); mLaunchExternalComponent->slotAccountWizard();
} }
} }
// must be the last line of the constructor: // must be the last line of the constructor:
......
...@@ -85,20 +85,6 @@ Akonadi::Item::Id KMail::Util::putRepliesInSameFolder( const Akonadi::Item& item ...@@ -85,20 +85,6 @@ Akonadi::Item::Id KMail::Util::putRepliesInSameFolder( const Akonadi::Item& item
return -1; 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<MailCommon::FolderCollection> &folder ) bool KMail::Util::handleClickedURL( const KUrl &url, const QSharedPointer<MailCommon::FolderCollection> &folder )
{ {
if ( url.protocol() == QLatin1String( "mailto" ) ) { if ( url.protocol() == QLatin1String( "mailto" ) ) {
......
...@@ -79,8 +79,6 @@ KMime::Types::Mailbox::List mailingListsFromMessage( const Akonadi::Item& item ) ...@@ -79,8 +79,6 @@ KMime::Types::Mailbox::List mailingListsFromMessage( const Akonadi::Item& item )
*/ */
Akonadi::Item::Id putRepliesInSameFolder( 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. * Handles a clicked URL, but only in case the viewer didn't handle it.
* Currently only support mailto. * Currently only support mailto.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment