From: hama Date: Wed, 20 Jan 2016 17:52:14 +0000 (+0100) Subject: makeDirWithParents(), chomp(), reimgconvert X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=c1773c930965fb962fbf6296d347bb151b92ed79;p=reqt makeDirWithParents(), chomp(), reimgconvert * new: ReFileUtils::makeDir(), makeDirWithParents() * changed: chomp() has now IN/OUT parameter text * reimgconvert: handles non continued directories (mkDirWithParent()) --- diff --git a/appl/refind/filefinder.cpp b/appl/refind/filefinder.cpp index 673f9f5..f051932 100644 --- a/appl/refind/filefinder.cpp +++ b/appl/refind/filefinder.cpp @@ -142,7 +142,7 @@ void FileFinder::fillTable(const QString& path, int depth){ } if (ignore) continue; - if (m_stop) + if (m_stop) break; if (depth >= m_minDepth && isValid(*it)){ bool isDir = it->isDir(); @@ -204,10 +204,10 @@ void FileFinder::run() */ void FileFinder::search(){ clock_t start = clock(); - setStop(false); + setStop(false); m_statistics.clear(); QString path = ReFileUtils::nativePath(m_baseDir); - path = ReQStringUtils::chomp(path, OS_SEPARATOR); + ReQStringUtils::chomp(path, OS_SEPARATOR); fillTable(path, 0); m_statistics.m_runtimeSeconds = (double) (clock() - start) / CLOCKS_PER_SEC; @@ -271,7 +271,7 @@ bool FileFinder::isValid(const QFileInfo& file){ */ void FileFinder::setStop(bool stop) { - m_stop = stop; + m_stop = stop; } diff --git a/appl/reimgconvert/converter.cpp b/appl/reimgconvert/converter.cpp index 1a6ce1e..20c3e9d 100644 --- a/appl/reimgconvert/converter.cpp +++ b/appl/reimgconvert/converter.cpp @@ -121,7 +121,7 @@ Converter::Converter(const QString &directory, MainWindow *mainWindow): * @throws ConverterException */ bool Converter::error(const QString& message){ - m_mainWindow->log(message); + m_mainWindow->externalError(message); throw ConverterException(message); return false; } @@ -133,8 +133,8 @@ bool Converter::error(const QString& message){ * @return true */ bool Converter::log(const QString& message){ - printf("%s\n", I18N::s2b(message).constData()); - m_mainWindow->log(message); + //printf("%s\n", I18N::s2b(message).constData()); + m_mainWindow->externalLog(message); return true; } @@ -243,11 +243,13 @@ void TaskConverter::callExternalProgram(const QString& source, const QString& ta * * @param source the file's name with path * @param target the new filename with path + * @param no the current number of the image file * @param size the size of the file (in byte) - * @param sizeTarget OUT: the file size of the target + * @param preSize IN/OUT: the sum of the file sizes before converting + * @param postSize IN/OUT: the sum of the file sizes after converting */ void TaskConverter::convertOneFile(const QString& source, const QString& target, - qint64 size, qint64& sizeTarget){ + int no, qint64 size, qint64& preSize, qint64& postSize){ int width = 0; int height = 0; QString info; @@ -260,17 +262,34 @@ void TaskConverter::convertOneFile(const QString& source, const QString& target, else handleUserDefined(width, height, widthNew, heightNew); QString relPath = source.mid(m_sourceDir.length()); - log( - relPath + " " + ReQStringUtils::readableSize(size) - + QString(" -> %1x%2 ").arg(widthNew).arg(heightNew)); + QString message = relPath + " " + ReQStringUtils::readableSize(size) + + " " + info; callExternalProgram(source, target, width, height, widthNew, heightNew, m_quality); - struct stat info; - if (stat(I18N::s2b(target).constData(), &info) == 0){ - sizeTarget = info.st_size; - m_mainWindow->externalAppend(ReGuiQueueItem::ListAppendToCurrent, - NULL, ReQStringUtils::readableSize(sizeTarget) - + " " + ReQStringUtils::readableDuration( - clock() - start)); + struct stat fileInfo; + if (stat(I18N::s2b(target).constData(), &fileInfo) != 0){ + error(tr("target file was not created: ") + relPath); + } else if (fileInfo.st_size == 0){ + error (tr("target file was empty: ") + relPath); + } else if (! readProperties(target, widthNew, heightNew, info)){ + error(tr("cannot read image properties from ") + target); + } else { + preSize += size; + postSize += fileInfo.st_size; + message += "-> " + info + " " + ReQStringUtils::readableSize(fileInfo.st_size) + + " " + ReQStringUtils::readableDuration(clock() - start); + log(message); + int percentFiles = int(no * 100 / max(1, m_totalFiles)); + int percentSize = int(preSize * 100 / max(1, min(preSize, m_totalBytes))); + int percent = preSize > m_totalBytes ? percentFiles + : (2 * percentFiles + percentSize) / 3; + info = tr("%1 file(s) of %2 (%3 %), %4 -> %5 (%6 %)") + .arg(no).arg(m_totalFiles) + .arg(percent) + .arg(ReQStringUtils::readableSize(preSize)) + .arg(ReQStringUtils::readableSize(postSize)) + .arg(postSize * 100.0 / max(1LL, preSize), 0, + 'f', 1); + m_mainWindow->externalAppend(ReGuiQueueItem::StatusLine, NULL, info); } } } @@ -420,7 +439,6 @@ void TaskConverter::run(){ clock_t start = clock(); qint64 preSize = 0; qint64 postSize = 0; - qint64 lengthTarget = 0; int no = 0; QString info; QString node; @@ -444,11 +462,10 @@ void TaskConverter::run(){ int ix = info.indexOf('\t'); node = info.mid(ix + 1); info.resize(ix); - targetDir = m_targetDir; - if (!info.isEmpty()) - targetDir += info + OS_SEPARATOR; + targetDir = m_targetDir + info; + ReQStringUtils::chomp(targetDir, OS_SEPARATOR); if (! QDir(targetDir).exists()) - _mkdir(I18N::s2b(targetDir).constData()); + ReFileUtils::makeDirWithParents(targetDir, m_mainWindow->logger()); QDir dir(targetDir); if (! dir.exists()){ error(tr("cannot create directory: %1").arg(targetDir)); @@ -459,21 +476,7 @@ void TaskConverter::run(){ QString nodeTarget = ReFileUtils::replaceExtension(node, "." + m_targetType); QString target = m_targetDir + info + nodeTarget; - convertOneFile(path, target, length, lengthTarget); - preSize += length; - postSize += lengthTarget; - int percentFiles = int(no * 100 / max(1, m_totalFiles)); - int percentSize = int(preSize * 100 / max(1, min(preSize, m_totalBytes))); - int percent = preSize > m_totalBytes ? percentFiles - : (2 * percentFiles + percentSize) / 3; - info = tr("%1 file(s) of %2 (%3 %), %4 -> %5 (%6 %)") - .arg(no).arg(m_totalFiles) - .arg(percent) - .arg(ReQStringUtils::readableSize(preSize)) - .arg(ReQStringUtils::readableSize(postSize)) - .arg(postSize * 100.0 / max(1LL, preSize), 0, - 'f', 1); - m_mainWindow->externalStatusMessage(LOG_INFO, info); + convertOneFile(path, target, no, length, preSize, postSize); } } diff --git a/appl/reimgconvert/converter.hpp b/appl/reimgconvert/converter.hpp index a0c4522..733c001 100644 --- a/appl/reimgconvert/converter.hpp +++ b/appl/reimgconvert/converter.hpp @@ -78,7 +78,7 @@ protected: int height, int widthNew, int heightNew, int quality); void converterTask(); void convertOneFile(const QString& source, const QString& target, - qint64 size, qint64& sizeTarget); + int no, qint64 size, qint64& preSize, qint64& postSize); bool handleSimple(int width, int height, int& widthNew, int& heightNew); bool handleUserDefined(int width, int height, int& widthNew, int& heightNew); bool readProperties(const QString& name, int &width, int &height, diff --git a/appl/reimgconvert/mainwindow.cpp b/appl/reimgconvert/mainwindow.cpp index 52c5d36..b3de701 100644 --- a/appl/reimgconvert/mainwindow.cpp +++ b/appl/reimgconvert/mainwindow.cpp @@ -135,8 +135,11 @@ void MainWindow::guiTimerUpdate() case ReGuiQueueItem::LogMessage: say(LOG_INFO, item.m_value); break; + case ReGuiQueueItem::LogError: + error(item.m_value); + break; case ReGuiQueueItem::StatusLine: - externalStatusMessage(false, item.m_value); + setStatusMessage(false, item.m_value); break; case ReGuiQueueItem::ListAppendToCurrent: { @@ -365,7 +368,7 @@ void MainWindow::selectTarget(){ * @param error true: the message is an error message * @param message the text to set */ -void MainWindow::externalStatusMessage(bool error, const QString& message){ +void MainWindow::setStatusMessage(bool error, const QString& message){ RE_UNUSED(error); m_statusMessage->setText(message); } diff --git a/appl/reimgconvert/mainwindow.hpp b/appl/reimgconvert/mainwindow.hpp index 5ee1406..ad4bc6c 100644 --- a/appl/reimgconvert/mainwindow.hpp +++ b/appl/reimgconvert/mainwindow.hpp @@ -36,7 +36,7 @@ public: virtual void aboutToQuit(); bool error(const QString& message); bool log(const QString& message); - void externalStatusMessage(bool error, const QString& message); + void setStatusMessage(bool error, const QString& message); public: virtual bool say(ReLoggerLevel level, const QString& message); private: diff --git a/base/ReFileUtils.cpp b/base/ReFileUtils.cpp index ac2e535..411a39c 100644 --- a/base/ReFileUtils.cpp +++ b/base/ReFileUtils.cpp @@ -16,6 +16,8 @@ enum { LOC_DELETE_TREE_2, // 11802 LOC_DELETE_TREE_3, // 11803 LOC_SET_TIMES_1, // 11804 + LOC_MAKE_DIR_1, // 11805 + LOC_MAKE_DIR_2, // 11806 }; QDateTime ReFileUtils::m_undefinedTime; @@ -29,45 +31,91 @@ ReTreeStatistic::ReTreeStatistic() : m_fileSizes(0L) { } -/** - * Appends a relative path to base directory name (absolute or relative). + +/** Normalizes a file path. * - * @param base the base directory, relative or absolute - * @param path a relative path (relative to base) - * @return path if it is an absolute path
- * otherwise: the combined path + * Removes duplicated slashes and "." and "..", but not leading "..". + * Change the 2nd separator to the native separator, e.g. "/" to "\\" + * + * @param path path to clean + * @return the path without duplicated separators and "." and ".." */ -QString ReFileUtils::pathAppend(const QString& base, const QString& path) { - QString rc; - if (isAbsolutPath(path)) - rc = path; - else if (!base.isEmpty()) - rc = QDir::cleanPath(base + OS_SEPARATOR + path); - else { - rc = path; - rc.replace("\\", "/"); - if (path.startsWith("/")) - rc.remove(0, 1); +QByteArray ReFileUtils::cleanPath(const char* path) { + QByteArray rc; + int length = strlen(path); + rc.reserve(length); + int minLength = 0; +#ifdef __WIN32__ + // UNC path, e.g. "\\server\share"? + if ((path[0] == OS_SEPARATOR || path[0] == OS_2nd_SEPARATOR) + && (path[1] == OS_SEPARATOR || path[1] == OS_2nd_SEPARATOR)) { + rc.append("\\\\"); + path += 2; + minLength = 2; + } +#endif + char cc = *path; + int startNode = 0; + if (cc == OS_SEPARATOR || cc == OS_2nd_SEPARATOR){ + path++; + startNode++; + rc.append(OS_SEPARATOR); + } + while ((cc = *path++) != '\0') { + if (cc != OS_SEPARATOR && cc != OS_2nd_SEPARATOR) + rc.append(cc); + // ignore duplicated slashes: + else if (rc.length() > 0 && rc.at(rc.length() - 1) != OS_SEPARATOR){ + int length = rc.length() - startNode; + if (length == 1 && rc.at(startNode) == '.') { + // ignore ".": remove it: + rc.resize(startNode); + } else if (length == 2 && rc.at(startNode) == '.' &&rc.at(startNode + 1) == '.') { + // remove "..": + rc.resize(startNode); + // remove the last slash and node + if (rc.length() > minLength) { + rc.resize(rc.size() - 1); + int ix = rc.lastIndexOf(OS_SEPARATOR); + if (ix > minLength) + rc.resize(ix + 1); + startNode = rc.length(); + } + } else { + rc.append(OS_SEPARATOR); + startNode = rc.length(); + } + } + } + length = rc.length() - startNode; + if (length == 1 && rc.at(startNode) == '.') { + // ignore ".": remove it: + rc.resize(startNode); + } else if (length == 2 && rc.at(startNode) == '.' + && startNode > 0 &&rc.at(startNode + 1) == '.') { + // remove "..": + rc.resize(startNode); + // remove the last slash and node + if (rc.length() > minLength) { + rc.resize(rc.size() - 1); + int ix = rc.lastIndexOf(OS_SEPARATOR); + if (ix > minLength) + rc.resize(ix); + } } return rc; } -/** - * Appends a relative path to base directory name (absolute or relative). +/** Normalizes a file path. * - * @param base the base directory, relative or absolute - * @param path a relative path (relative to base) - * @return path if it is an absolute path
- * otherwise: the combined path + * Removes duplicated slashes and "." and "..", but not leading "..". + * Change the 2nd separator to the native separator, e.g. "/" to "\\" + * + * @param path path to clean + * @return the path without duplicated separators and "." and ".." */ -QByteArray ReFileUtils::pathAppend(const char* base, const char* path) { - QByteArray rc; - if (base[0] != '\0') { - rc.append(base).append(OS_SEPARATOR).append(path); - } else { - rc = path; - } - return cleanPath(rc.constData()); +QString ReFileUtils::cleanPath(const QString& path) { + return (QString) cleanPath(I18N::s2b(path).constData()); } /** @@ -237,6 +285,84 @@ bool ReFileUtils::isRootDir(const char* path) #endif } +/** + * Creates a directory (if not it does not exist) and logs errors. + * + * @param path the full name + * @param logger NULL or the logger + * @return true: success: the directory exists
+ * false: error occurred + */ +bool ReFileUtils::makeDir(const char* path, ReLogger* logger) { + struct stat info; + bool rc = true; + if (stat(path, &info) != 0) { + rc = _mkdir(path) == 0; + if (!rc && logger != NULL) + logger->log(LOG_ERROR, LOC_MAKE_DIR_1, + QObject::tr("can't create directory (%1): %2").arg(errno).arg(path)); + } else if (!S_ISDIR(info.st_mode)) { + rc = false; + if (logger != NULL) + logger->log(LOG_ERROR, LOC_MAKE_DIR_2, + QObject::tr("can't create directory (is a file): ") + path); + } + return rc; +} +/** + * Creates a directory (if not it does not exist) and logs errors. + * + * @param path the full name + * @param logger NULL or the logger + * @return true: success: the directory exists
+ * false: error occurred + */ +bool ReFileUtils::makeDir(const QString& path, ReLogger* logger) { + return makeDir(I18N::s2b(path).constData(), logger); +} +/** + * Creates a directory and (if necessary) its parent directories. + * + * @param path the full name + * @param logger NULL or the logger + * @return true: success: the directory exists
+ * false: error occurred + */ +bool ReFileUtils::makeDirWithParents(const char* path, ReLogger* logger) { + const char* end; + const char* start = path; + bool rc = true; + QByteArray dir; + while (rc && (end = strchr(start, OS_SEPARATOR)) != NULL) { + if (end == path) { + start++; + dir += OS_SEPARATOR; + } else { + dir.append(start, end - start); + start = end + 1; + rc = makeDir(dir.constData(), logger); + dir += OS_SEPARATOR; + } + } + if (rc && start[0] != '\0') { + dir.append(start); + rc = makeDir(dir.constData(), logger); + } + return rc; +} + +/** + * Creates a directory and (if necessary) its parent directories. + * + * @param path the full name + * @param logger NULL or the logger + * @return true: success: the directory exists
+ * false: error occurred + */ +bool ReFileUtils::makeDirWithParents(const QString& path, ReLogger* logger) { + return makeDirWithParents(I18N::s2b(path).constData(), logger); +} + /** * Extracts the node of a filename. * @@ -309,90 +435,45 @@ QString ReFileUtils::parentOf(const QString& filename) { return rc; } -/** Normalizes a file path. - * - * Removes duplicated slashes and "." and "..", but not leading "..". - * Change the 2nd separator to the native separator, e.g. "/" to "\\" +/** + * Appends a relative path to base directory name (absolute or relative). * - * @param path path to clean - * @return the path without duplicated separators and "." and ".." + * @param base the base directory, relative or absolute + * @param path a relative path (relative to base) + * @return path if it is an absolute path
+ * otherwise: the combined path */ -QByteArray ReFileUtils::cleanPath(const char* path) { - QByteArray rc; - int length = strlen(path); - rc.reserve(length); - int minLength = 0; -#ifdef __WIN32__ - // UNC path, e.g. "\\server\share"? - if ((path[0] == OS_SEPARATOR || path[0] == OS_2nd_SEPARATOR) - && (path[1] == OS_SEPARATOR || path[1] == OS_2nd_SEPARATOR)) { - rc.append("\\\\"); - path += 2; - minLength = 2; - } -#endif - char cc = *path; - int startNode = 0; - if (cc == OS_SEPARATOR || cc == OS_2nd_SEPARATOR){ - path++; - startNode++; - rc.append(OS_SEPARATOR); - } - while ((cc = *path++) != '\0') { - if (cc != OS_SEPARATOR && cc != OS_2nd_SEPARATOR) - rc.append(cc); - // ignore duplicated slashes: - else if (rc.length() > 0 && rc.at(rc.length() - 1) != OS_SEPARATOR){ - int length = rc.length() - startNode; - if (length == 1 && rc.at(startNode) == '.') { - // ignore ".": remove it: - rc.resize(startNode); - } else if (length == 2 && rc.at(startNode) == '.' &&rc.at(startNode + 1) == '.') { - // remove "..": - rc.resize(startNode); - // remove the last slash and node - if (rc.length() > minLength) { - rc.resize(rc.size() - 1); - int ix = rc.lastIndexOf(OS_SEPARATOR); - if (ix > minLength) - rc.resize(ix + 1); - startNode = rc.length(); - } - } else { - rc.append(OS_SEPARATOR); - startNode = rc.length(); - } - } - } - length = rc.length() - startNode; - if (length == 1 && rc.at(startNode) == '.') { - // ignore ".": remove it: - rc.resize(startNode); - } else if (length == 2 && rc.at(startNode) == '.' - && startNode > 0 &&rc.at(startNode + 1) == '.') { - // remove "..": - rc.resize(startNode); - // remove the last slash and node - if (rc.length() > minLength) { - rc.resize(rc.size() - 1); - int ix = rc.lastIndexOf(OS_SEPARATOR); - if (ix > minLength) - rc.resize(ix); - } +QString ReFileUtils::pathAppend(const QString& base, const QString& path) { + QString rc; + if (isAbsolutPath(path)) + rc = path; + else if (!base.isEmpty()) + rc = QDir::cleanPath(base + OS_SEPARATOR + path); + else { + rc = path; + rc.replace("\\", "/"); + if (path.startsWith("/")) + rc.remove(0, 1); } return rc; } -/** Normalizes a file path. - * - * Removes duplicated slashes and "." and "..", but not leading "..". - * Change the 2nd separator to the native separator, e.g. "/" to "\\" +/** + * Appends a relative path to base directory name (absolute or relative). * - * @param path path to clean - * @return the path without duplicated separators and "." and ".." + * @param base the base directory, relative or absolute + * @param path a relative path (relative to base) + * @return path if it is an absolute path
+ * otherwise: the combined path */ -QString ReFileUtils::cleanPath(const QString& path) { - return (QString) cleanPath(I18N::s2b(path).constData()); +QByteArray ReFileUtils::pathAppend(const char* base, const char* path) { + QByteArray rc; + if (base[0] != '\0') { + rc.append(base).append(OS_SEPARATOR).append(path); + } else { + rc = path; + } + return cleanPath(rc.constData()); } /** diff --git a/base/ReFileUtils.hpp b/base/ReFileUtils.hpp index 23b021e..a2f0f80 100644 --- a/base/ReFileUtils.hpp +++ b/base/ReFileUtils.hpp @@ -63,6 +63,10 @@ public: return path.replace(OS_2nd_SEPARATOR, OS_SEPARATOR); #endif } + static bool makeDir(const char* path, ReLogger* logger); + static bool makeDir(const QString& path, ReLogger* logger); + static bool makeDirWithParents(const char* path, ReLogger* logger); + static bool makeDirWithParents(const QString& path, ReLogger* logger); static QString nodeOf(const QString& filename); static QByteArray nodeOf(const char* filename); static QString parentOf(const QString& filename); diff --git a/base/ReQStringUtils.cpp b/base/ReQStringUtils.cpp index 721479f..789edc7 100644 --- a/base/ReQStringUtils.cpp +++ b/base/ReQStringUtils.cpp @@ -27,24 +27,24 @@ const QString ReQStringUtils::m_empty; /** * Removes end of line characters if any. * - * @param text text to inspect + * @param text IN: text to inspect
+ * OUT: without trailing cc * @param cc character to remove. If '\\n' also '\\r' will be removed - * @return text without trailing cc + * @return text */ -ReString ReQStringUtils::chomp(const ReString& text, char cc) { +ReString& ReQStringUtils::chomp(ReString& text, char cc) { int last = text.length() - 1; - if (last < 0) - return text; - else { + if (last >= 0){ if (cc != '\n'){ - return text.at(last) == cc ? text.mid(0, last) : text; + text.resize(last); } else { while (last >= 0 && (text[last] == '\n' || text[last] == '\r')) { last--; } - return last == text.length() - 1 ? text : text.left(last + 1); + text.resize(last); } } + return text; } /** diff --git a/base/ReQStringUtils.hpp b/base/ReQStringUtils.hpp index eca88b8..bcf2cdf 100644 --- a/base/ReQStringUtils.hpp +++ b/base/ReQStringUtils.hpp @@ -40,7 +40,7 @@ public: */ class ReQStringUtils { public: - static ReString chomp(const ReString& text, char cc = '\n'); + static ReString& chomp(ReString& text, char cc = '\n'); static int countOf(const QString& value, QChar toFind, int start = 0); static QString& ensureLastChar(QString& value, QChar lastChar); static int lengthOfDate(const ReString& text, int start = 0, QDate* value = diff --git a/base/ReStringUtils.cpp b/base/ReStringUtils.cpp index 3dd566c..efb9cf1 100644 --- a/base/ReStringUtils.cpp +++ b/base/ReStringUtils.cpp @@ -31,7 +31,8 @@ const QByteArray ReStringUtils::m_empty; /** * Removes a given character from the end of the string if it is there. * - * @param string string to change + * @param string IN: string to inspect + * OUT: string without trailing cc * @param cc character to remove. Default: end of line ('\n')
* If cc is '\n' then also '\\r' will be removed * at the end of the string diff --git a/base/rebase.hpp b/base/rebase.hpp index bbdb203..355b277 100644 --- a/base/rebase.hpp +++ b/base/rebase.hpp @@ -69,7 +69,7 @@ typedef QString ReString; #define OS_2nd_SEPARATOR '\\' #define OS_2nd_SEPARATOR_STR "\\" #define _memicmp memicmp -#define _mkdir(path) mkdir(path, -1) +#define _mkdir(path) mkdir(path, ALLPERMS) #define _rmdir rmdir #define _unlink unlink typedef qint64 uint64_t; diff --git a/gui/ReGuiApplication.cpp b/gui/ReGuiApplication.cpp index 306758d..249f7bb 100644 --- a/gui/ReGuiApplication.cpp +++ b/gui/ReGuiApplication.cpp @@ -108,6 +108,16 @@ void ReGuiApplication::initializeGuiElements(){ m_guiTimer->start(100); } +/** + * Returns the logger. + * + * @return the logger + */ +ReLogger* ReGuiApplication::logger() +{ + return &m_logger; +} + /** * @brief Logs a message * @@ -127,6 +137,20 @@ bool ReGuiApplication::externalAppend(ReGuiQueueItem::WidgetType type, QWidget* } +/** + * Writes a text to the log. + * + * Note: this method is called from a non-main thread + * + * @param message the text to set + */ +void ReGuiApplication::externalError(const QString& message){ + m_mutexGuiQueue.lock(); + m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::LogError, NULL, + message)); + m_mutexGuiQueue.unlock(); +} + /** * Writes a text to the log. * diff --git a/gui/ReGuiApplication.hpp b/gui/ReGuiApplication.hpp index 97b27a8..0c30c65 100644 --- a/gui/ReGuiApplication.hpp +++ b/gui/ReGuiApplication.hpp @@ -30,8 +30,11 @@ public slots: public: static QString buildHomeDir(QString homeDirBase, const QString& node); bool externalAppend(ReGuiQueueItem::WidgetType type, QWidget* widget, const QString& info); + void externalError(const QString& message); void externalLog(const QString& message); void externalTaskFinished(const QString& message); + ReLogger* logger(); + protected: void initializeGuiElements(); protected slots: