diff options
| author | TrickyLeifa <date.epoch@gmail.com> | 2024-05-15 00:00:17 +0200 |
|---|---|---|
| committer | TrickyLeifa <date.epoch@gmail.com> | 2024-05-15 00:04:16 +0200 |
| commit | c9f52b7223685d2e7fca925594171f94dd8c6e3b (patch) | |
| tree | 740bb32a40da98a4d52836432f59a16b31333900 /src/debug_functions.cpp | |
| parent | 951766666621fa77e257e6b5616fe4ab1eb2a52f (diff) | |
Ported to CMake, ...
* Ported the project to CMake
* Android and Mac support dropped for the time
being.
* Tests, BASS and Discord-RPC are now options
* Restructured and reformated the project.
* Merged `include` and `src`
* Renamed `resource` to `data`
* Renamed various files
* External libraries headers are no longer included in `src`
* Replaced header guards with #pragma once
* Multiple refactors (keywords, headers)
* Added Qt6 compatibility
* Removed various unused functions and headers
* Reworked AOPacket
* When content is passed to AOPacket, it should be ensured that the content is already decoded.
* Encoding/decoding are now static methods.
* Fixed various memory leaks
* Removed animation code for AOImage
* AOImage is always using static images
* Simplified ChatLogPiece
Diffstat (limited to 'src/debug_functions.cpp')
| -rw-r--r-- | src/debug_functions.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/debug_functions.cpp b/src/debug_functions.cpp index f4f7b3a7..79be51b3 100644 --- a/src/debug_functions.cpp +++ b/src/debug_functions.cpp @@ -1,3 +1,5 @@ +#include "debug_functions.h" + #include <QCoreApplication> #include <QDialogButtonBox> #include <QElapsedTimer> @@ -7,17 +9,13 @@ #include <functional> -#include "debug_functions.h" - void call_error(QString p_message) { QMessageBox *msgBox = new QMessageBox; msgBox->setAttribute(Qt::WA_DeleteOnClose); - msgBox->setText(QCoreApplication::translate("debug_functions", "Error: %1") - .arg(p_message)); - msgBox->setWindowTitle( - QCoreApplication::translate("debug_functions", "Error")); + msgBox->setText(QCoreApplication::translate("debug_functions", "Error: %1").arg(p_message)); + msgBox->setWindowTitle(QCoreApplication::translate("debug_functions", "Error")); // msgBox->setWindowModality(Qt::NonModal); msgBox->exec(); @@ -29,8 +27,7 @@ void call_notice(QString p_message) msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setText(p_message); - msgBox->setWindowTitle( - QCoreApplication::translate("debug_functions", "Notice")); + msgBox->setWindowTitle(QCoreApplication::translate("debug_functions", "Notice")); msgBox->setStandardButtons(QMessageBox::Ok); msgBox->setDefaultButton(QMessageBox::Ok); @@ -42,9 +39,10 @@ void call_notice(QString p_message) int counter = 3; const auto updateCounter = [msgBox, &counter] { if (counter <= 0) + { return; - msgBox->defaultButton()->setText( - QString("%1 (%2)").arg(QDialogButtonBox::tr("OK")).arg(counter)); + } + msgBox->defaultButton()->setText(QString("%1 (%2)").arg(QDialogButtonBox::tr("OK")).arg(counter)); counter--; }; @@ -58,6 +56,5 @@ void call_notice(QString p_message) intervalTimer.stop(); }); - msgBox->exec(); - + msgBox->exec(); } |
