No, only 4.3.4.
I've no idea to locate the problem. I think there is a big mistake in my code. Now, I'll debug the code to locate the problem. For Example:
main.cpp
#include <QApplication>
#include "MainWindow/MainWindow.h"
#include "LoginDialog/LoginDialog.h"
#include "Settings/Settings.h"
#include "StartupWizard/StartupWizard.h"
#include <QtSql>
int main(int argc, char *argv[]) {
db.setHostName("192.168.2.229");
db.setUserName("qfinancialoffice");
db.setPassword("test");
db.setDatabaseName("qfinancialoffice");
if (!db.open())
else
CSettings *configure = new CSettings;
if (configure->settings.firstrun) {
QMessageBox::information(0,
QObject::tr("Erster Start"),
QObject::tr("Dies ist der erste Start von <b>QFinancialOffice</b>.\nAls erstes muessen Sie <b>QFinancialOffice</b> konfigurieren."));
ClassWizard *wizard = new ClassWizard;
if (wizard->exec() == ClassWizard::Accepted) {
process.waitForStarted();
}
delete configure;
return 1;
} else {
CLoginDialog *login = new CLoginDialog;
if (login->exec() == CLoginDialog::Accepted) {
CMainWindow *window = new CMainWindow;
window->show();
} else {
QMessageBox::critical(0,
QString("Fehler"),
QString("Der Login war nicht erfolgreich\n Programm kann nicht gestartet werden.\n"));
return 1;
}
}
app.exec();
}
#include <QApplication>
#include "MainWindow/MainWindow.h"
#include "LoginDialog/LoginDialog.h"
#include "Settings/Settings.h"
#include "StartupWizard/StartupWizard.h"
#include <QtSql>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QCoreApplication::setOrganizationName("NORO-Automaten");
QCoreApplication::setOrganizationDomain("http://www.noro.de");
QCoreApplication::setApplicationName("QFinancialOffice");
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("192.168.2.229");
db.setUserName("qfinancialoffice");
db.setPassword("test");
db.setDatabaseName("qfinancialoffice");
if (!db.open())
QMessageBox::critical(0, QString("Error"), QString("The error:\n%1").arg(db.lastError().text()));
else
QMessageBox::critical(0, QString("OK"), QString("OK"));
CSettings *configure = new CSettings;
if (configure->settings.firstrun) {
QMessageBox::information(0, QObject::tr("Erster Start"), QObject::tr("Dies ist der erste Start von <b>QFinancialOffice</b>.\nAls erstes muessen Sie <b>QFinancialOffice</b> konfigurieren."));
ClassWizard *wizard = new ClassWizard;
if (wizard->exec() == ClassWizard::Accepted) {
QMessageBox::information(0, QObject::tr("Neustart"), QObject::tr("QFinancialOffice wird jetzt neu gestartet."));
QProcess process;
process.startDetached(QApplication::applicationFilePath());
process.waitForStarted();
}
delete configure;
return 1;
} else {
CLoginDialog *login = new CLoginDialog;
if (login->exec() == CLoginDialog::Accepted) {
CMainWindow *window = new CMainWindow;
window->show();
} else {
QMessageBox::critical(0, QString("Fehler"), QString("Der Login war nicht erfolgreich\n Programm kann nicht gestartet werden.\n"));
return 1;
}
}
app.exec();
}
To copy to clipboard, switch view to plain text mode
You can see, at first I'll test my local database connection, this test fails on windows but not on linux. In my test program there is the same test code and it works.
I don't know, but can it be, that I have an memory problem?
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
To copy to clipboard, switch view to plain text mode
This object will be saved on the stack. If my stack is full I had an undefined problem or not?
The problem is unbelievabl.
Bookmarks