[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:27:27 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=10a1867
The following commit has been merged in the master branch:
commit 10a186795f8145b103f205998a11d158ad99cf65
Author: Àlex Fiestas <afiestas at kde.org>
Date: Mon Mar 3 19:26:55 2014 +0100
Adapt coding style to kdelibs
Using kdelibs style is not enforced but it is nice to use so all
kde hackers can work on this code without feeling out of place.
---
kded/kded.cpp | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/kded/kded.cpp b/kded/kded.cpp
index 1b3c8df..21465ec 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -46,8 +46,7 @@ Kded::~Kded()
bool Kded::start()
{
- if (m_daemon)
- {
+ if (m_daemon) {
return true;
}
@@ -61,34 +60,31 @@ bool Kded::start()
m_daemon->setProgram(daemon);
m_daemon->setOutputChannelMode(KProcess::SeparateChannels);
m_daemon->start();
- if (!m_daemon->waitForStarted(2000)) //FIXME: KDEDs should be non-blocking, do we really need to wait for it to start?
- {
+ if (!m_daemon->waitForStarted(2000)) {//FIXME: KDEDs should be non-blocking, do we really need to wait for it to start?
kError(kdeconnect_kded()) << "Can't start " << daemon;
return false;
}
m_daemon->closeReadChannel(KProcess::StandardOutput);
-
+
kDebug(kdeconnect_kded()) << "Daemon successfuly started";
return true;
}
void Kded::stop()
{
- if (m_daemon)
- {
- m_daemon->terminate();
- if (m_daemon->waitForFinished(10000))
- {
- kDebug(kdeconnect_kded()) << "Daemon successfuly stopped";
- }
- else
- {
- m_daemon->kill();
- kWarning(kdeconnect_kded()) << "Daemon killed";
- }
- m_daemon = 0;
+ if (!m_daemon) {
+ return true;
+ }
+
+ m_daemon->terminate();
+ if (m_daemon->waitForFinished(10000)) {
+ kDebug(kdeconnect_kded()) << "Daemon successfuly stopped";
+ } else {
+ m_daemon->kill();
+ kWarning(kdeconnect_kded()) << "Daemon killed";
}
+ m_daemon = 0;
}
bool Kded::restart()
@@ -104,17 +100,15 @@ void Kded::onError(QProcess::ProcessError errorCode)
void Kded::onFinished(int exitCode, QProcess::ExitStatus status)
{
- if (status == QProcess::CrashExit)
- {
+ if (status == QProcess::CrashExit) {
kError(kdeconnect_kded()) << "Process crashed with code=" << exitCode;
kError(kdeconnect_kded()) << m_daemon->readAllStandardError();
kWarning(kdeconnect_kded()) << "Restarting in 5 sec...";
QTimer::singleShot(5000, this, SLOT(start()));
- }
- else
- {
+ } else {
kWarning(kdeconnect_kded()) << "Process finished with code=" << exitCode;
}
+
m_daemon = 0;
}
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list