summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/main.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp
index 55a5260..dd757b5 100644
--- a/noncore/net/wellenreiter/gui/main.cpp
+++ b/noncore/net/wellenreiter/gui/main.cpp
@@ -53,5 +53,19 @@ int main( int argc, char **argv )
a.processEvents(); // show the window before doing the safety checks
int result = -1;
+ static int killed = false;
+ bool check = true;
+ for ( int i = 1; i < argc; ++i )
+ {
+ if ( !strcmp( "-nocheck", argv[i] ) )
+ {
+ qDebug( "-nocheck found" );
+ check = false;
+ break;
+ }
+ }
+
+ if ( check )
+ {
// root check
if ( getuid() )
@@ -67,6 +81,4 @@ int main( int argc, char **argv )
// and I want to call it like that: if ( OProcess::isRunning( QString& ) ) ...
- static int killed = false;
-
QString line;
QDir d = QDir( "/proc" );
@@ -98,7 +110,11 @@ int main( int argc, char **argv )
}
}
+ }
a.exec();
+ if ( check )
+ {
+
if ( killed )
{
@@ -111,4 +127,5 @@ int main( int argc, char **argv )
delete w;
+ }
return 0;
}