Skip to content

Commit

Permalink
Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-poidevin committed Apr 5, 2017
1 parent d01b566 commit 64a35da
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,17 @@ bool MainWindow::init()
ui->restoreButton->setEnabled(false);

QMessageBox msgBox;
msgBox.setInformativeText("The System Integrity Protection is enabled\nPlease follow the instructions to disable it");
msgBox.setWindowTitle("SIP Enabled");

QAbstractButton* pButtonYes = msgBox.addButton(tr("Take me to tutorial"), QMessageBox::YesRole);
msgBox.addButton(tr("Nope"), QMessageBox::NoRole);
msgBox.show();
msgBox.setIcon(QMessageBox::Information);
msgBox.exec();

int answer = QMessageBox::information(this,"SIP Enabled","The System Integrity Protection is enabled\nPlease follow the instructions to disable it", QMessageBox::Yes | QMessageBox::No);

if (answer == QMessageBox::YesRole)
if (msgBox.clickedButton()== pButtonYes)
{
QString link = "http://www.google.com";
QString link = "https://www.youtube.com/watch?v=Wmhal4shmVo";
QDesktopServices::openUrl(QUrl(link));
}
}
Expand Down Expand Up @@ -139,7 +140,7 @@ bool MainWindow::isSIPEnabled(void)
//Get command line output
SIPStatus = process.readAllStandardOutput();

//#ifndef WINDOWS
#ifndef WINDOWS
if(SIPStatus.contains("disable"))
{
return false;
Expand All @@ -148,9 +149,9 @@ bool MainWindow::isSIPEnabled(void)
{
return true;
}
//#else
// return false;
//#endif
#else
return false;
#endif
}


Expand Down

0 comments on commit 64a35da

Please sign in to comment.