This commit is contained in:
gulle
2017-07-20 17:18:41 +03:00
parent b1258f2a01
commit fad7a15bd6
3 changed files with 67 additions and 1 deletions
@@ -0,0 +1,28 @@
--- a/kate/main.cpp
+++ b/kate/main.cpp
@@ -51,24 +51,9 @@
#include "qtsingleapplication/qtsingleapplication.h"
#endif
-#ifndef Q_OS_WIN
-#include <unistd.h>
-#endif
-#include <iostream>
-
int main(int argc, char **argv)
{
-#ifndef Q_OS_WIN
- /**
- * Check whether we are running as root
- **/
- if (getuid() == 0) {
- std::cout << "Executing Kate as root is not possible. To edit files as root use:" << std::endl;
- std::cout << "SUDO_EDITOR=kate sudoedit <file>" << std::endl;
- return 0;
- }
-#endif
/**
* init resources from our static lib
*/
@@ -0,0 +1,27 @@
--- a/kwrite/main.cpp
+++ b/kwrite/main.cpp
@@ -42,23 +42,8 @@
#include "../urlinfo.h"
-#ifndef Q_OS_WIN
-#include <unistd.h>
-#endif
-#include <iostream>
-
extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
{
-#ifndef Q_OS_WIN
- /**
- * Check whether we are running as root
- **/
- if (getuid() == 0) {
- std::cout << "Executing KWrite as root is not possible. To edit files as root use:" << std::endl;
- std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl;
- return 0;
- }
-#endif
/**
* Create application first
* Enforce application name even if the executable is renamed