# HG changeset patch # User Michiel Broek # Date 1648375155 -7200 # Node ID 64cf5468fd22293d99102e4845c0b13737149138 # Parent 5e0ae285aaafbca5e843989306c2dc97f23c9650 Improve the CMakeLists.txt. Cleanup unused variables. Removed som debug messages. diff -r 5e0ae285aaaf -r 64cf5468fd22 CMakeLists.txt --- a/CMakeLists.txt Sat Mar 26 22:45:02 2022 +0100 +++ b/CMakeLists.txt Sun Mar 27 11:59:15 2022 +0200 @@ -14,7 +14,6 @@ # Compile flags -OPTION(DO_RELEASE_BUILD "If on, will do a release build. Otherwise, debug build." OFF) option(UPDATE_TRANSLATIONS "Enable rescanning sources to update .ts files" OFF) # Automatically run moc on source files when necessary @@ -25,23 +24,6 @@ SET( CMAKE_CXX_FLAGS_RELEASE "-Wall -ansi -pedantic -Wno-long-long -O2 -pipe" ) SET( CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -pipe" ) -#====================================================Set build type===================================================== -# We might always to tell the compiler to include debugging information (eg via the -g option on gcc). It makes the -# binaries slightly bigger on Linux, but helps greatly in analysing core dumps etc. (In closed-source projects people -# sometimes turn it off for release builds to make it harder to reverse engineer the software, but obviously that's not -# an issue for us.) -# -# However, setting CMAKE_BUILD_TYPE to "Debug", also changes other things, such as the default location for config -# files, which we don't want on a release build, so we would probably need to set compiler flags directly. -# -# .:TBD:. Investigate whether setting CMAKE_BUILD_TYPE to "RelWithDebInfo" does what we want. -# -#IF( ${DO_RELEASE_BUILD} ) -# SET(CMAKE_BUILD_TYPE "Release") -#ELSE() -# SET(CMAKE_BUILD_TYPE "Debug") -#ENDIF() - # ===== Directories ===== IF( NOT EXEC_PREFIX ) diff -r 5e0ae285aaaf -r 64cf5468fd22 src/MainWindow.cpp --- a/src/MainWindow.cpp Sat Mar 26 22:45:02 2022 +0100 +++ b/src/MainWindow.cpp Sun Mar 27 11:59:15 2022 +0200 @@ -262,14 +262,14 @@ void MainWindow::on_actionSupplies_list_triggered() { qDebug() << Q_FUNC_INFO; - QDialog *printer = new PrinterDialog(PR_SUPPLIES, -1, this); + PrinterDialog(PR_SUPPLIES, -1, this); } void MainWindow::on_actionYeast_bank_triggered() { qDebug() << Q_FUNC_INFO; - QDialog *printer = new PrinterDialog(PR_YEASTBANK, -1, this); + PrinterDialog(PR_YEASTBANK, -1, this); } diff -r 5e0ae285aaaf -r 64cf5468fd22 src/PrinterDialog.cpp --- a/src/PrinterDialog.cpp Sat Mar 26 22:45:02 2022 +0100 +++ b/src/PrinterDialog.cpp Sun Mar 27 11:59:15 2022 +0200 @@ -30,18 +30,12 @@ QPrinter printer(QPrinter::ScreenResolution); QPrintPreviewDialog preview(&printer, this); - connect(&preview, &QPrintPreviewDialog::paintRequested, - this, &PrinterDialog::printDocument); + connect(&preview, &QPrintPreviewDialog::paintRequested, this, &PrinterDialog::printDocument); preview.exec(); - - qDebug() << "return"; } -PrinterDialog::~PrinterDialog() -{ - qDebug() << "PrinterDialog done"; -} +PrinterDialog::~PrinterDialog() {} void PrinterDialog::printDocument(QPrinter *printer)