diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2021-12-30 20:44:59 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-30 20:44:59 -0600 |
| commit | 6e1e847750dc593bcb2571c9775b2db11661cdb2 (patch) | |
| tree | d744ace687e5a603e00daae604cb1a5a35de6795 /src/text_file_functions.cpp | |
| parent | 593bd54000be14c9a1455914285c1b2549b0fa51 (diff) | |
Add and refine debug log messages (#625)
Since these are going to be visible to the user now, at least let's properly format them and make them somewhat helpful.
Diffstat (limited to 'src/text_file_functions.cpp')
| -rw-r--r-- | src/text_file_functions.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 6ea82f59..46e7511e 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -164,11 +164,14 @@ QStringList AOApplication::get_list_file(QString p_file) QString AOApplication::read_file(QString filename) { + if (filename.isEmpty()) + return QString(); + QFile f_log(filename); if (!f_log.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning() << "Couldn't open" << filename; - return ""; + qWarning() << "Couldn't open" << filename << "for reading"; + return QString(); } QTextStream in(&f_log); |
