mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-08 00:44:39 -04:00
Made trace file for Qt debugging output a CMake build option.
WSJT-X has a capability of redirecting Qt debugging output (qDebug, qWarning etc.) to a trace file 'wsjtx_trace.log' which is created in the application run directory if not already present. Setting the CMake build option WSJT_QDEBUG_TO_FILE to ON will enable this feature. It should be noted that this option is not compatible with a distributibutable official release since writing to the application directory is not recommended. Also in a full Release configuration build all Qt debugging code is elided so no useful trace would be obtained anyway. The CMake option WSJT_QDEBUG_IN_RELEASE may be useful in concert with this option as it causes Qt debugging statements to remain in place in a Release build configuration. Again not recommended in a full Release build since the debugging code both slows down the application and adds unecessary bloat to the executable size. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4032 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
@@ -74,11 +74,13 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
QSettings settings(config_path.absoluteFilePath (a.applicationName () + ".ini"), QSettings::IniFormat);
|
||||
|
||||
#if WSJT_QDEBUG_TO_FILE
|
||||
// // open a trace file
|
||||
// TraceFile trace_file {QDir {QApplication::applicationDirPath ()}.absoluteFilePath ("wsjtx_trace.log")};
|
||||
TraceFile trace_file {QDir {QApplication::applicationDirPath ()}.absoluteFilePath ("wsjtx_trace.log")};
|
||||
|
||||
// // announce to log file
|
||||
// qDebug () << program_title (revision ()) + " - Program startup";
|
||||
// announce to trace file
|
||||
qDebug () << program_title (revision ()) + " - Program startup";
|
||||
#endif
|
||||
|
||||
// Create and initialize shared memory segment
|
||||
// Multiple instances: use rig_name as shared memory key
|
||||
|
||||
Reference in New Issue
Block a user