summary refs log tree commit diff
path: root/src/dialogs/PreviewUploadOverlay.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-14 02:28:35 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-14 02:28:35 +0300
commit8e9d210a2a2136d1d517645b2b2412b15da09360 (patch)
treeb58bd7b236e9759bbc4b310ebffb0687f89db47d /src/dialogs/PreviewUploadOverlay.cc
parentAdd support for sending encrypted messages (diff)
downloadnheko-8e9d210a2a2136d1d517645b2b2412b15da09360.tar.xz
Rename the log namespace to avoid symbol clash with the math function
- Patch the olm repo with a CMakeLists.txt file
Diffstat (limited to 'src/dialogs/PreviewUploadOverlay.cc')
-rw-r--r--src/dialogs/PreviewUploadOverlay.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dialogs/PreviewUploadOverlay.cc b/src/dialogs/PreviewUploadOverlay.cc

index 3c44e911..db1e31f2 100644 --- a/src/dialogs/PreviewUploadOverlay.cc +++ b/src/dialogs/PreviewUploadOverlay.cc
@@ -17,7 +17,6 @@ #include <QApplication> #include <QBuffer> -#include <QDebug> #include <QFile> #include <QFileInfo> #include <QHBoxLayout> @@ -25,6 +24,7 @@ #include <QVBoxLayout> #include "Config.h" +#include "Logging.hpp" #include "Utils.h" #include "dialogs/PreviewUploadOverlay.h" @@ -142,8 +142,9 @@ PreviewUploadOverlay::setPreview(const QString &path) QFile file{path}; if (!file.open(QIODevice::ReadOnly)) { - qWarning() << "Failed to open file from:" << path; - qWarning() << "Reason:" << file.errorString(); + nhlog::ui()->warn("Failed to open file ({}): {}", + path.toStdString(), + file.errorString().toStdString()); close(); return; } @@ -152,7 +153,7 @@ PreviewUploadOverlay::setPreview(const QString &path) auto mime = db.mimeTypeForFileNameAndData(path, &file); if ((data_ = file.readAll()).isEmpty()) { - qWarning() << "Failed to read media:" << file.errorString(); + nhlog::ui()->warn("Failed to read media: {}", file.errorString().toStdString()); close(); return; }