mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-03 08:55:54 +00:00
finally implement bug reporting (#104)
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include <KNotifications/KNotification>
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QFile>
|
||||
#include <QProcess>
|
||||
#include <QUrl>
|
||||
|
||||
@ -56,6 +57,23 @@ void AWActions::checkUpdates(const bool showAnyway)
|
||||
}
|
||||
|
||||
|
||||
QString AWActions::getFileContent(const QString path) const
|
||||
{
|
||||
qCDebug(LOG_AW) << "Get content from file" << path;
|
||||
|
||||
QFile inputFile(path);
|
||||
if (!inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qCWarning(LOG_AW) << "Could not open file as text"
|
||||
<< inputFile.fileName();
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString output = inputFile.readAll();
|
||||
inputFile.close();
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
// HACK: since QML could not use QLoggingCategory I need this hack
|
||||
bool AWActions::isDebugEnabled() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user