mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2d823ecdd8
commit
c55c9c790d
3 changed files with 8 additions and 35 deletions
|
@ -248,38 +248,16 @@ void KToolInvocation::invokeHelp( const QString& anchor,
|
|||
url.addQueryItem(QString::fromLatin1("anchor"), anchor);
|
||||
}
|
||||
|
||||
// launch a browser for URIs not handled by khelpcenter
|
||||
#warning launch a KDE browser for URIs that require KIO slave support
|
||||
/*
|
||||
// launch a KDE browser for URIs that require KIO slave support
|
||||
// (following KCMultiDialog::slotHelpClicked())
|
||||
if (!(url.protocol() == QLatin1String("help") || url.protocol() == QLatin1String("man") || url.protocol() == QLatin1String("info"))) {
|
||||
if (url.protocol() == QLatin1String("help") || url.protocol() == QLatin1String("man") || url.protocol() == QLatin1String("info")) {
|
||||
invokeBrowser(url.url());
|
||||
return;
|
||||
}
|
||||
|
||||
QDBusInterface *iface = new QDBusInterface(QLatin1String("org.kde.khelpcenter"),
|
||||
QLatin1String("/KHelpCenter"),
|
||||
QLatin1String("org.kde.khelpcenter.khelpcenter"),
|
||||
QDBusConnection::sessionBus());
|
||||
if ( !iface->isValid() )
|
||||
{
|
||||
QString error;
|
||||
if (startServiceByDesktopName(QLatin1String("khelpcenter"), url.url(), &error, 0, 0, startup_id, false))
|
||||
{
|
||||
KMessage::message(KMessage::Error,
|
||||
i18n("Could not launch the KDE Help Center:\n\n%1", error),
|
||||
i18n("Could not Launch Help Center"));
|
||||
delete iface;
|
||||
return;
|
||||
}
|
||||
|
||||
delete iface;
|
||||
iface = new QDBusInterface(QLatin1String("org.kde.khelpcenter"),
|
||||
QLatin1String("/KHelpCenter"),
|
||||
QLatin1String("org.kde.khelpcenter.khelpcenter"),
|
||||
QDBusConnection::sessionBus());
|
||||
}
|
||||
|
||||
iface->call(QString::fromLatin1("openUrl"), url.url(), startup_id );
|
||||
delete iface;
|
||||
*/
|
||||
invokeBrowser(url.url());
|
||||
}
|
||||
|
||||
void KToolInvocation::invokeMailer(const QString &address, const QString &subject, const QByteArray& startup_id)
|
||||
|
|
|
@ -61,9 +61,8 @@ void KGlobalSettingsTest::initTestCase()
|
|||
QSignalSpy appearance_spy( settings, SIGNAL(appearanceChanged()) )
|
||||
|
||||
static void callClient( const QString& opt, const char* signalToWaitFor ) {
|
||||
QProcess proc;
|
||||
QVERIFY(QFile::exists("./kdeui-kglobalsettingsclient"));
|
||||
QVERIFY(proc.execute("./kdeui-kglobalsettingsclient", QStringList(opt)));
|
||||
QVERIFY(QProcess::execute("./kdeui-kglobalsettingsclient", QStringList(opt)));
|
||||
|
||||
QVERIFY(QTest::kWaitForSignal(KGlobalSettings::self(), signalToWaitFor, 5000));
|
||||
}
|
||||
|
|
|
@ -351,11 +351,7 @@ void KCMultiDialog::slotHelpClicked()
|
|||
}
|
||||
|
||||
KUrl docUrl( KUrl( "help:/" ), docPath );
|
||||
if ( docUrl.protocol() == "help" || docUrl.protocol() == "man" || docUrl.protocol() == "info" ) {
|
||||
QProcess::startDetached("khelpcenter", QStringList() << docUrl.url());
|
||||
} else {
|
||||
KToolInvocation::invokeBrowser( docUrl.url() );
|
||||
}
|
||||
KToolInvocation::invokeBrowser( docUrl.url() );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue