From 61044df1850d8e9e43bf4e50e2995eb74bc2cd8f Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Tue, 2 Apr 2013 08:10:27 +0200 Subject: [PATCH] Use xmlguiclient was a bad idea here --- kmmainwidget.cpp | 2 +- kmreadermainwin.cpp | 6 +++--- kmreaderwin.cpp | 10 ++-------- kmreaderwin.h | 4 +--- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index 6dac93e00..546bd2715 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -1114,7 +1114,7 @@ void KMMainWidget::createWidgets() // Create the reader window // if ( mReaderWindowActive ) { - mMsgView = new KMReaderWin( mGUIClient, this, this, actionCollection(), 0 ); + mMsgView = new KMReaderWin( this, this, actionCollection(), 0 ); if ( mMsgActions ) { mMsgActions->setMessageView( mMsgView ); } diff --git a/kmreadermainwin.cpp b/kmreadermainwin.cpp index b9fc570d1..c1de0c4f1 100644 --- a/kmreadermainwin.cpp +++ b/kmreadermainwin.cpp @@ -73,7 +73,7 @@ KMReaderMainWin::KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride, char *name ) : KMail::SecondaryWindow( name ? name : "readerwindow#" ) { - mReaderWin = new KMReaderWin( this, this, this, actionCollection()); + mReaderWin = new KMReaderWin( this, this, actionCollection()); //mReaderWin->setShowCompleteMessage( true ); mReaderWin->setHtmlOverride( htmlOverride ); mReaderWin->setHtmlLoadExtOverride( htmlLoadExtOverride ); @@ -86,7 +86,7 @@ KMReaderMainWin::KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride, KMReaderMainWin::KMReaderMainWin( char *name ) : KMail::SecondaryWindow( name ? name : "readerwindow#" ) { - mReaderWin = new KMReaderWin( this, this, this, actionCollection()); + mReaderWin = new KMReaderWin( this, this, actionCollection()); initKMReaderMainWin(); } @@ -95,7 +95,7 @@ KMReaderMainWin::KMReaderMainWin( char *name ) KMReaderMainWin::KMReaderMainWin(KMime::Content* aMsgPart, bool aHTML, const QString & encoding, char *name ) : KMail::SecondaryWindow( name ? name : "readerwindow#" ) { - mReaderWin = new KMReaderWin( this, this, this, actionCollection() ); + mReaderWin = new KMReaderWin( this, this, actionCollection() ); mReaderWin->setOverrideEncoding( encoding ); mReaderWin->setHtmlOverride( aHTML ); mReaderWin->setMsgPart( aMsgPart ); diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 9e5483825..eca538eba 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -93,7 +93,7 @@ using namespace KMail; using namespace MailCommon; //----------------------------------------------------------------------------- -KMReaderWin::KMReaderWin(KXMLGUIClient *guiClient, QWidget *aParent, +KMReaderWin::KMReaderWin(QWidget *aParent, QWidget *mainWindow, KActionCollection* actionCollection, Qt::WindowFlags aFlags ) @@ -111,7 +111,7 @@ KMReaderWin::KMReaderWin(KXMLGUIClient *guiClient, QWidget *aParent, createActions(); QVBoxLayout * vlay = new QVBoxLayout( this ); vlay->setMargin( 0 ); - mViewer = new Viewer( mActionCollection, guiClient, this, mainWindow ); + mViewer = new Viewer( this, mainWindow, mActionCollection ); mViewer->setExternalWindow( true ); mViewer->setAppName( "KMail" ); connect( mViewer, SIGNAL(urlClicked(Akonadi::Item,KUrl)), @@ -792,12 +792,6 @@ KAction *KMReaderWin::resetMessageDisplayFormatAction() return mViewer->resetMessageDisplayFormatAction(); } -void KMReaderWin::setXmlGuiClient( KXMLGUIClient *guiClient ) -{ - mViewer->setXmlGuiClient(guiClient); -} - - #include "kmreaderwin.moc" diff --git a/kmreaderwin.h b/kmreaderwin.h index e9383da2e..2f73b7fb8 100644 --- a/kmreaderwin.h +++ b/kmreaderwin.h @@ -48,7 +48,7 @@ class KMReaderWin: public QWidget { Q_OBJECT public: - explicit KMReaderWin( KXMLGUIClient *guiClient, QWidget *parent, QWidget *mainWindow, + explicit KMReaderWin( QWidget *parent, QWidget *mainWindow, KActionCollection *actionCollection, Qt::WindowFlags f = 0 ); virtual ~KMReaderWin(); @@ -164,8 +164,6 @@ public: void setContactItem(const Akonadi::Item& contact); - void setXmlGuiClient( KXMLGUIClient *guiClient ); - signals: /** Emitted after parsing of a message to have it stored in unencrypted state in it's folder. */