Skip to content

Commit 2a0624d

Browse files
committed
Code refactoring
1 parent a96e05a commit 2a0624d

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

qtc_packaging/debian_harmattan/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Homepage: https://github.com/lcferrum
99
Package: hmtsu
1010
Architecture: any
1111
Depends: ${shlibs:Depends}, ${misc:Depends}
12+
Recommends: busybox (>= 1.20) | which, busybox-symlinks-procps (>= 1.20) | procps, dpkg
1213
Description: HMTsu is a frontend to devel-su, sudo and ariadne.
1314
Inspired by gksu, it's primary purpose is to run graphical programs
1415
that need root without the need to run an terminal emulator and using

src/context.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ void Context::Run()
423423
if (Tools) {
424424
Tools->Run(user, login, kpp_env, command, splash, splash_lscape);
425425
delete Tools;
426+
Tools=NULL;
426427
}
427428
}
428429

src/pswtools.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
using namespace std;
2424

25-
Q_DECLARE_METATYPE(RunModes::QmlEnum)
26-
2725
PswTools::PswTools():
2826
QObject(NULL), prepared(false), no_pass(false), pw_passwd()
2927
{
@@ -62,14 +60,12 @@ bool PswTools::PrepareForCheck(RunModes::QmlEnum mode, const QString &target_use
6260
return false;
6361
}
6462

65-
bool PswTools::CheckSuNoPass()
63+
void PswTools::CheckSuNoPass()
6664
{
6765
//if (user_record->pw_uid==getuid()||!getuid())
6866
if (getuid()==ROOT_UID) {
6967
no_pass=true;
7068
}
71-
72-
return true;
7369
}
7470

7571
bool PswTools::CheckSudoNoPass()

src/pswtools.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class PswTools: public QObject, protected IntercomHandler {
2828
bool no_pass;
2929
QByteArray pw_passwd;
3030
bool PrepareForCheck(RunModes::QmlEnum mode, const QString &target_user);
31-
bool CheckSuNoPass();
31+
void CheckSuNoPass();
3232
bool CheckSudoNoPass();
3333
public:
3434
PswTools();

0 commit comments

Comments
 (0)