summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/progressloggergui.cpp7
-rw-r--r--rbutil/rbutilqt/systrace.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp
index de2be96165..c553c1dc82 100644
--- a/rbutil/rbutilqt/progressloggergui.cpp
+++ b/rbutil/rbutilqt/progressloggergui.cpp
@@ -144,9 +144,12 @@ void ProgressLoggerGui::saveErrorLog()
{
QString filename = QFileDialog::getSaveFileName(downloadProgress, tr("Save system trace log"),
QDir::homePath(), "*.log");
-
+ if(filename == "")
+ return;
+
QFile file(filename);
- file.open(QIODevice::WriteOnly);
+ if(!file.open(QIODevice::WriteOnly))
+ return;
//Logger texts
QString loggerTexts = "\n*********************************************\n"
diff --git a/rbutil/rbutilqt/systrace.cpp b/rbutil/rbutilqt/systrace.cpp
index 42babfe2f8..21b4a1f93b 100644
--- a/rbutil/rbutilqt/systrace.cpp
+++ b/rbutil/rbutilqt/systrace.cpp
@@ -46,9 +46,12 @@ void SysTrace::save(void)
{
QString fp = QFileDialog::getSaveFileName(this, tr("Save system trace log"),
QDir::homePath(), "*.log");
-
+ if(fp == "")
+ return;
+
QFile fh(fp);
- fh.open(QIODevice::WriteOnly);
+ if(!fh.open(QIODevice::WriteOnly))
+ return;
fh.write(debugbuffer.toUtf8(), debugbuffer.size());
fh.close();
}