.... just a last question. When I do:
if (QFile ("lockFile.lock").
isOpen()) {
QMessageBox::about(0,
"Attention".
"The app is already running");
close();
}
QFile lockFile
("lockFile.lock");
lockFile.
open(QFile::WriteOnly);
...
if (QFile ("lockFile.lock").isOpen())
{
QMessageBox::about(0, "Attention". "The app is already running");
close();
}
QFile lockFile("lockFile.lock");
lockFile.open(QFile::WriteOnly);
...
To copy to clipboard, switch view to plain text mode
because of this "close();" the application crushes. It is good that it does not start second time but it produces a windows error saying that "application suddenly terminated, let's report the bug through the internet" or something. I just push ingnore and that is fine but can I do it without that terrible message from Windows?
Bookmarks