diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-25 18:27:11 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-25 18:27:11 -0400 |
commit | 6defe842e03d25827d3638fda8629236593ebc04 (patch) | |
tree | cffb496a6b1ec18c936ddb1a1ffeddc87c039248 /src-qt5/desktop-utils/lumina-fm/MainUI.cpp | |
parent | Speed up some of the desktop init procedures again. (diff) | |
download | lumina-6defe842e03d25827d3638fda8629236593ebc04.tar.gz lumina-6defe842e03d25827d3638fda8629236593ebc04.tar.bz2 lumina-6defe842e03d25827d3638fda8629236593ebc04.zip |
Re-enable the "Root Mode" warning at the top of lumina-fm, and setup the root detection to work properly.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 2d4cfe84..87c3a0f8 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -17,6 +17,7 @@ #include <ExternalProcess.h> #define DEBUG 0 +bool rootmode = false; MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ //for Signal/slot we must register the Typedef of QFileInfoList @@ -27,7 +28,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ //qRegisterMetaType< QList<QPersistentModelIndex> >("QList<QPersistentModelIndex>"); waitingToClose = false; //put if statement here to check if running as root - rootmode = false; + rootmode = (getuid()==0); ui->setupUi(this); if(DEBUG){ qDebug() << "Initilization:"; } |