Permalink
Browse files

now program can close itself if user does not want to change uid/pwd

combination if account is locked
  • Loading branch information...
1 parent 2263a0b commit efd208b254a51a1cae38ff12c0d8fa44ee8c0d0b @euklid committed Oct 8, 2011
Showing with 12 additions and 2 deletions.
  1. +9 −2 cuedussmann.cpp
  2. +1 −0 cuedussmann.h
  3. +2 −0 main.cpp
View
@@ -10,8 +10,10 @@ cuedussmann::cuedussmann(QWidget *parent) :
QMainWindow(parent)
{
initialized=0;
+ wegonnaquit=0;
setupUi(this);
initialized=initialize();
+ if(initialized==31) wegonnaquit=1;
connect(comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(parsemenufile(int))); //combobox must be connected with the checkboxes, to set them checked or not, the checkboxes must be connected with the cell clicked functions...
//TODO:
/* now the menufiles should be downloaded (OK) and BE PARSED (OK), so that the actual week is shown in the table(OK). The combobox must
@@ -57,9 +59,9 @@ int cuedussmann::initialize()
{
cuedussmann::on_actionUID_PWD_ndern_triggered();
}
- if(ret==QMessageBox::RejectRole)
+ if(ret==262144 || ret==0) //is for acceptrole
{
- QApplication::quit();break;
+ qApp->quit(); return 31;
}
}
@@ -201,6 +203,11 @@ void cuedussmann::on_actionUID_PWD_ndern_triggered()
free(slynmbwochen);
free(changedmenu);
free(ratings);
+ free(wocheplustagplusdaten);
+ free(hidden);
+ free(bergruen);
+ free(bergruend);
+ free(bestelldaten);
initialized=0;
}
initialized=initialize();
View
@@ -9,6 +9,7 @@ class cuedussmann : public QMainWindow, public Ui::cuedussmann
public:
explicit cuedussmann(QWidget *parent = 0);
+ int wegonnaquit;
private slots:
View
@@ -4,7 +4,9 @@
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
+ a.setQuitOnLastWindowClosed(false);
cuedussmann w;
+ if(w.wegonnaquit==1) return 0;
w.show();
return a.exec();

0 comments on commit efd208b

Please sign in to comment.