diff --git a/part.cpp b/part.cpp index bf93550e2..65c9fcc1d 100644 --- a/part.cpp +++ b/part.cpp @@ -510,7 +510,7 @@ bool Part::slotImportPSFile() return false; } - KUrl url = KFileDialog::getOpenURL( QString::null, "application/postscript" ); + KUrl url = KFileDialog::getOpenURL( KUrl(), "application/postscript", this->widget() ); KTempFile tf( QString::null, ".pdf" ); if ( tf.status() == 0 && url.isLocalFile()) diff --git a/part.h b/part.h index ae90d17e7..61a62e19f 100644 --- a/part.h +++ b/part.h @@ -23,7 +23,7 @@ #include "core/observer.h" #include "core/document.h" -#include +#include class QAction; class QWidget; @@ -81,8 +81,8 @@ public: static KAboutData* createAboutData(); public slots: // dbus - Q_SCRIPTABLE Q_ASYNC void goToPage(uint page); - Q_SCRIPTABLE Q_ASYNC void openDocument(KUrl doc); + Q_SCRIPTABLE Q_NOREPLY void goToPage(uint page); + Q_SCRIPTABLE Q_NOREPLY void openDocument(KUrl doc); Q_SCRIPTABLE uint pages(); Q_SCRIPTABLE uint currentPage(); Q_SCRIPTABLE KUrl currentDocument(); diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 15fea005c..205360079 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include // system includes #include @@ -1382,7 +1382,7 @@ if (d->document->handleEvent( e ) ) else if ( choice == imageToFile ) { // [3] save pixmap to file - QString fileName = KFileDialog::getSaveFileName( QString::null, "image/png image/jpeg", this ); + QString fileName = KFileDialog::getSaveFileName( KUrl(), "image/png image/jpeg", this ); if ( fileName.isEmpty() ) d->messageWindow->display( i18n( "File not saved." ), PageViewMessage::Warning ); else @@ -1415,8 +1415,13 @@ if (d->document->handleEvent( e ) ) // Albert says is this ever necessary? // we already attached on Part constructor // If KTTSD not running, start it. +#warning check if this is the right wat to check if a service is active #warning need to check the name the kttsd service gets and fix it here - if (!QDBus::sessionBus().busService()->nameHasOwner("org.kde.kttsd")) + QDBusReply reply = QDBus::sessionBus().interface()->isServiceRegistered("org.kde.kttsd"); + bool kttsdactive = false; + if ( reply.isValid() ) + kttsdactive = reply.value(); + if ( kttsdactive ) { QString error; if (KToolInvocation::startServiceByDesktopName("kttsd", QStringList(), &error)) @@ -1448,9 +1453,9 @@ if (d->document->handleEvent( e ) ) client->send("kttsd", "KSpeech", "startText(uint)", data2 ); }*/ #warning this is probably wrong, check when kttsd is dbus ported - QDBusInterfacePtr kspeech("org.kde.kttsd", "/modules/KSpeech", "org.kde.KSpeech"); - kspeech->call("setText", selectedText, QString()); - kspeech->call("startText", 0); + QDBusInterface kspeech("org.kde.kttsd", "/modules/KSpeech", "org.kde.KSpeech"); + kspeech.call("setText", selectedText, QString()); + kspeech.call("startText", 0); } } }