Reactive "copy url"

svn path=/branches/work/akonadi-ports/kdepim/; revision=1047225
wilder-work
Laurent Montel 17 years ago
parent b35baedccb
commit 5743494a94
  1. 1
      kmcommands.cpp
  2. 9
      kmreaderwin.cpp
  3. 1
      kmreaderwin.h

@ -622,7 +622,6 @@ KMUrlCopyCommand::KMUrlCopyCommand( const KUrl &url, KMMainWidget *mainWidget )
KMCommand::Result KMUrlCopyCommand::execute()
{
QClipboard* clip = QApplication::clipboard();
if (mUrl.protocol() == "mailto") {
// put the url into the mouse selection and the clipboard
QString address = MessageViewer::StringUtil::decodeMailtoUrl( mUrl.path() );

@ -150,6 +150,7 @@ KMReaderWin::KMReaderWin(QWidget *aParent,
vlay->setMargin( 0 );
mViewer = new Viewer( this,KGlobal::config(),mainWindow,mActionCollection );
connect( mViewer, SIGNAL(urlClicked( const Akonadi::Item &, const KUrl & ) ), this, SLOT( slotUrlClicked( const Akonadi::Item &, const KUrl& ) ) );
connect( mViewer, SIGNAL( copyUrl( const KUrl& ) ), this, SLOT( slotCopyUrl( const KUrl& ) ) );
vlay->addWidget( mViewer );
readConfig();
@ -735,6 +736,14 @@ void KMReaderWin::slotUrlClicked( const Akonadi::Item & item, const KUrl & url )
command->start();
}
void KMReaderWin::slotCopyUrl( const KUrl& url )
{
KMCommand *command =
new KMUrlCopyCommand( url,
dynamic_cast<KMMainWidget*>( mMainWindow ) );
command->start();
}
#include "kmreaderwin.moc"

@ -272,6 +272,7 @@ public slots:
void slotAddBookmarks();
void slotTouchMessage();
void slotUrlClicked( const Akonadi::Item &, const KUrl& );
void slotCopyUrl( const KUrl& );
protected:
KUrl urlClicked() const;

Loading…
Cancel
Save