Skip to content
Snippets Groups Projects
Commit 734cf323 authored by borsitsb's avatar borsitsb
Browse files

diagnostic: added OSX support

parent 1a99f655
Branches master
No related tags found
No related merge requests found
...@@ -114,6 +114,8 @@ QString Diagnostic::getDGPingOutput(){ ...@@ -114,6 +114,8 @@ QString Diagnostic::getDGPingOutput(){
out << proc.exec(QString("ping -n -c 4 -W 1 %1").arg(ip)); out << proc.exec(QString("ping -n -c 4 -W 1 %1").arg(ip));
break; break;
case OS_OSX: case OS_OSX:
out << proc.exec(QString("ping -n -c 4 -W 1 %1").arg(ip));
break;
default: default:
static_assert(true, "This OS is not supported"); static_assert(true, "This OS is not supported");
break; break;
......
...@@ -38,7 +38,10 @@ void Privileges::checkPrivileges(QWidget *parent, const QString title, const QSt ...@@ -38,7 +38,10 @@ void Privileges::checkPrivileges(QWidget *parent, const QString title, const QSt
return !(getuid() && geteuid()); return !(getuid() && geteuid());
} }
#elif defined(Q_OS_OSX) #elif defined(Q_OS_OSX)
#error "OSX is not supported yet!" #include <unistd.h>
bool Privileges::isRoot(){
return !(getuid() && geteuid());
}
#else #else
#error "This OS is not supported yet!" #error "This OS is not supported yet!"
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment