Merge pull request #55 from namecheap/bugfix/RND-660-flameshot-get-cache-path-for-linux-according-to-xdg-standard

Bugfix/rnd 660 flameshot get cache path for linux according to xdg standard
This commit is contained in:
Yurii Puchkov
2020-10-12 04:39:08 -07:00
committed by GitHub
6 changed files with 9 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ SetShortcutDialog::SetShortcutDialog(QDialog* parent)
: QDialog(parent)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowIcon(QIcon(":img/app/flameshot.svg"));
setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg"));
setWindowTitle(tr("Set Shortcut"));
m_ks = QKeySequence();

View File

@@ -39,7 +39,7 @@ ShortcutsWidget::ShortcutsWidget(QWidget* parent)
: QWidget(parent)
{
setAttribute(Qt::WA_DeleteOnClose);
setWindowIcon(QIcon(":img/app/flameshot.svg"));
setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg"));
setWindowTitle(tr("Hot Keys"));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))

View File

@@ -59,7 +59,7 @@ void ImgUploader::init(const QString& title, const QString& label)
resultStatus = false;
setWindowTitle(title);
setWindowIcon(QIcon(":img/app/flameshot.svg"));
setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg"));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
QRect position = frameGeometry();

View File

@@ -65,7 +65,7 @@ void ImgS3Uploader::init(const QString& title, const QString& label)
resultStatus = false;
setWindowTitle(title);
setWindowIcon(QIcon(":img/app/flameshot.svg"));
setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg"));
}
QNetworkProxy* ImgS3Uploader::proxy()

View File

@@ -2,6 +2,7 @@
#include "src/utils/confighandler.h"
#include <QDir>
#include <QFile>
#include <QProcessEnvironment>
#include <QStringList>
History::History()
@@ -11,7 +12,9 @@ History::History()
#ifdef Q_OS_WIN
m_historyPath = QDir::homePath() + "/AppData/Roaming/flameshot/history/";
#else
m_historyPath = QDir::homePath() + "/.cache/flameshot/history/";
QString path = QProcessEnvironment::systemEnvironment().value(
"XDG_CACHE_HOME", QDir::homePath() + "/.cache");
m_historyPath = path + "/flameshot/history/";
#endif
// Check if directory for history exists and create if doesn't

View File

@@ -20,7 +20,6 @@
#include <QIcon>
#include <QKeyEvent>
#include <QLabel>
#include <QTableWidget>
#include <QVBoxLayout>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
@@ -55,7 +54,7 @@ InfoWindow::InfoWindow(QWidget* parent)
void InfoWindow::initLabels()
{
QLabel* icon = new QLabel();
icon->setPixmap(QPixmap(":img/app/flameshot.svg"));
icon->setPixmap(QPixmap(":img/app/org.flameshot.Flameshot.svg"));
icon->setAlignment(Qt::AlignHCenter);
m_layout->addWidget(icon);