mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kmix: replace KProcess with QProcess
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1663b4a7a5
commit
1636f17034
2 changed files with 6 additions and 23 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <QCursor>
|
||||
#include <QString>
|
||||
#include <QMenuBar>
|
||||
#include <QProcess>
|
||||
|
||||
// include files for KDE
|
||||
#include <KConfigSkeleton>
|
||||
|
@ -48,7 +49,6 @@
|
|||
#include <kactioncollection.h>
|
||||
#include <ktoggleaction.h>
|
||||
#include <ksystemeventfilter.h>
|
||||
#include <KProcess>
|
||||
#include <KTabWidget>
|
||||
|
||||
// KMix
|
||||
|
@ -1270,27 +1270,11 @@ KMixWindow::slotHWInfo()
|
|||
void
|
||||
KMixWindow::slotKdeAudioSetupExec()
|
||||
{
|
||||
QStringList args;
|
||||
args << "kcmshell4" << "kcmplayer";
|
||||
forkExec(args);
|
||||
}
|
||||
|
||||
void
|
||||
KMixWindow::forkExec(const QStringList& args)
|
||||
{
|
||||
int pid = KProcess::startDetached(args);
|
||||
if (pid == 0)
|
||||
{
|
||||
static const QString startErrorMessage(
|
||||
i18n("The helper application is either not installed or not working."));
|
||||
QString msg;
|
||||
msg += startErrorMessage;
|
||||
msg += "\n(";
|
||||
msg += args.join(QLatin1String(" "));
|
||||
msg += ')';
|
||||
errorPopup(msg);
|
||||
}
|
||||
|
||||
static const QString kcmshell4 = QString::fromLatin1("kcmshell4");
|
||||
static const QStringList kcmshell4args = QStringList() << QString::fromLatin1("kcmplayer");
|
||||
if (!QProcess::startDetached(kcmshell4, kcmshell4args)) {
|
||||
errorPopup(i18n("The kcmshell4 application is either not installed or not working."));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -92,7 +92,6 @@ public slots:
|
|||
private:
|
||||
KMixerWidget* findKMWforTab( const QString& tabId );
|
||||
|
||||
void forkExec(const QStringList& args);
|
||||
void errorPopup(const QString& msg);
|
||||
|
||||
KAction* _actionShowMenubar;
|
||||
|
|
Loading…
Add table
Reference in a new issue