From 76925b031ed821c1a77353aae24c7e47a07e0315 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Fri, 3 Jul 2020 16:14:49 +0300 Subject: [PATCH 1/4] Remove delete button on form upload to s3 window --- src/tools/imgs3/imgs3uploader.cpp | 12 ------------ src/tools/imgs3/imgs3uploader.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/src/tools/imgs3/imgs3uploader.cpp b/src/tools/imgs3/imgs3uploader.cpp index 0d292e1d..fd8cda72 100644 --- a/src/tools/imgs3/imgs3uploader.cpp +++ b/src/tools/imgs3/imgs3uploader.cpp @@ -245,19 +245,15 @@ void ImgS3Uploader::onUploadOk() { m_copyUrlButton = new QPushButton(tr("Copy URL")); m_openUrlButton = new QPushButton(tr("Open URL")); - m_openDeleteUrlButton = new QPushButton(tr("Delete image")); m_toClipboardButton = new QPushButton(tr("Image to Clipboard.")); m_hLayout->addWidget(m_copyUrlButton); m_hLayout->addWidget(m_openUrlButton); - m_hLayout->addWidget(m_openDeleteUrlButton); m_hLayout->addWidget(m_toClipboardButton); connect(m_copyUrlButton, &QPushButton::clicked, this, &ImgS3Uploader::copyURL); connect(m_openUrlButton, &QPushButton::clicked, this, &ImgS3Uploader::openURL); - connect(m_openDeleteUrlButton, &QPushButton::clicked, - this, &ImgS3Uploader::openDeleteURL); connect(m_toClipboardButton, &QPushButton::clicked, this, &ImgS3Uploader::copyImage); } @@ -274,14 +270,6 @@ void ImgS3Uploader::copyURL() { m_notification->showMessage(tr("URL copied to clipboard.")); } -void ImgS3Uploader::openDeleteURL() -{ - bool successful = QDesktopServices::openUrl(m_deleteImageURL); - if (!successful) { - m_notification->showMessage(tr("Unable to open the URL.")); - } -} - void ImgS3Uploader::copyImage() { QApplication::clipboard()->setPixmap(m_pixmap); m_notification->showMessage(tr("Screenshot copied to clipboard.")); diff --git a/src/tools/imgs3/imgs3uploader.h b/src/tools/imgs3/imgs3uploader.h index ac950be5..78d3e3e9 100644 --- a/src/tools/imgs3/imgs3uploader.h +++ b/src/tools/imgs3/imgs3uploader.h @@ -46,7 +46,6 @@ private slots: void openURL(); void copyURL(); - void openDeleteURL(); void copyImage(); private: @@ -68,11 +67,9 @@ private: LoadSpinner *m_spinner; // uploaded QPushButton *m_openUrlButton; - QPushButton *m_openDeleteUrlButton; QPushButton *m_copyUrlButton; QPushButton *m_toClipboardButton; QUrl m_imageURL; - QUrl m_deleteImageURL; NotificationWidget *m_notification; void upload(); From 4c009a7572d7b6dc208687ef5b8391f81ac4f2c8 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Fri, 3 Jul 2020 17:00:12 +0300 Subject: [PATCH 2/4] Update version everywehere with a single command 'update_version_everywhere.sh' --- flameshot.pro | 7 +++++-- update_version_everywhere.sh | 15 +++++++++++++++ win_setup/flameshot.iss | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 update_version_everywhere.sh diff --git a/flameshot.pro b/flameshot.pro index 257e53f0..a1de7bc1 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -7,11 +7,14 @@ win32:LIBS += -luser32 -lshell32 BASE_VERSION = 0.7.1 -TAG_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags) +TAG_VERSION = "$$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)" isEmpty(TAG_VERSION){ TAG_VERSION = $$BASE_VERSION + DEFINES += APP_VERSION=\\\"$$BASE_VERSION\\\" +} +else { + DEFINES += APP_VERSION=\\\"$$BASE_VERSION-$$TAG_VERSION\\\" } -DEFINES += APP_VERSION=\\\"$$TAG_VERSION\\\" QT += core gui widgets network svg diff --git a/update_version_everywhere.sh b/update_version_everywhere.sh new file mode 100755 index 00000000..241f7b30 --- /dev/null +++ b/update_version_everywhere.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +BASE_VERSION_OLD=0.7.0 +BASE_VERSION_NEW=0.7.1 + +sed -i "s/BASE_VERSION = ${BASE_VERSION_OLD}/BASE_VERSION = ${BASE_VERSION_NEW}/g" flameshot.pro + +sed -i "s/AppVersion=${BASE_VERSION_OLD}/AppVersion=${BASE_VERSION_NEW}/g" ./win_setup/flameshot.iss +sed -i "s/VersionInfoVersion=${BASE_VERSION_OLD}/VersionInfoVersion=${BASE_VERSION_NEW}/g" ./win_setup/flameshot.iss + +sed -i "s/version: ${BASE_VERSION_OLD}/version: ${BASE_VERSION_NEW}/g" appveyor.yml + +sed -i "s/VERSION=${BASE_VERSION_OLD}/VERSION=${BASE_VERSION_NEW}/g" .travis.yml + +qmake diff --git a/win_setup/flameshot.iss b/win_setup/flameshot.iss index aaab83a0..6ab1b3f7 100644 --- a/win_setup/flameshot.iss +++ b/win_setup/flameshot.iss @@ -6,9 +6,9 @@ [Setup] AppName=FlameShot -AppVersion=1.0.0.1 +AppVersion=0.7.1 AppCopyright=NameCheap inc. -VersionInfoVersion=1.0.0.1 +VersionInfoVersion=0.7.1 WizardStyle=modern DefaultDirName={autopf}\FlameShot DefaultGroupName=FlameShot From 5c184c6b4bd2c47e8af8a8a9ae86a9cdc52b0886 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Fri, 3 Jul 2020 17:11:55 +0300 Subject: [PATCH 3/4] Add desktop icon for windows installation --- win_setup/flameshot.iss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win_setup/flameshot.iss b/win_setup/flameshot.iss index 6ab1b3f7..7daa446a 100644 --- a/win_setup/flameshot.iss +++ b/win_setup/flameshot.iss @@ -34,7 +34,8 @@ Source: "flameshot\platforms\*"; DestDir: "{app}\platforms" Source: "flameshot\translations\*"; DestDir: "{app}\translations" [Icons] -Name: "{group}\FlameShot"; Filename: "{app}\flameshot.exe" +Name: "{group}\FlameShot"; Filename: "{app}\flameshot.exe"; WorkingDir: "{app}" +Name: "{commondesktop}\FlameShot"; Filename: "{app}\flameshot.exe"; WorkingDir: "{app}" ; NOTE: Most apps do not need registry entries to be pre-created. If you ; don't know what the registry is or if you need to use it, then chances are From 8aedf565116424fb34a5f0fa29755d4ce2ee306b Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Fri, 3 Jul 2020 17:13:01 +0300 Subject: [PATCH 4/4] Update version to 0.7.2 --- .travis.yml | 2 +- appveyor.yml | 2 +- flameshot.pro | 2 +- update_version_everywhere.sh | 4 ++-- win_setup/flameshot.iss | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28e01037..5842097f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ env: # Environment variables for packaging - PRODUCT=flameshot #TODO: we should take version from the last tag in git history + build number - - VERSION=0.7.1 + - VERSION=0.7.2 - RELEASE=1 - ARCH=x86_64 # Dockerfile from https://github.com/flameshotapp/flameshot-docker-images diff --git a/appveyor.yml b/appveyor.yml index 87ba63e3..4a933f04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ image: Visual Studio 2015 #TODO: we should take version from the last tag in git history + build number -version: 0.7.1.{build} +version: 0.7.2.{build} # Major_Version_Number.Minor_Version_Number.Patch_Number.Build_Number skip_branch_with_pr: true diff --git a/flameshot.pro b/flameshot.pro index a1de7bc1..2475330f 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -6,7 +6,7 @@ win32:LIBS += -luser32 -lshell32 -BASE_VERSION = 0.7.1 +BASE_VERSION = 0.7.2 TAG_VERSION = "$$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)" isEmpty(TAG_VERSION){ TAG_VERSION = $$BASE_VERSION diff --git a/update_version_everywhere.sh b/update_version_everywhere.sh index 241f7b30..6c17417b 100755 --- a/update_version_everywhere.sh +++ b/update_version_everywhere.sh @@ -1,7 +1,7 @@ #!/bin/bash -BASE_VERSION_OLD=0.7.0 -BASE_VERSION_NEW=0.7.1 +BASE_VERSION_OLD=0.7.1 +BASE_VERSION_NEW=0.7.2 sed -i "s/BASE_VERSION = ${BASE_VERSION_OLD}/BASE_VERSION = ${BASE_VERSION_NEW}/g" flameshot.pro diff --git a/win_setup/flameshot.iss b/win_setup/flameshot.iss index 7daa446a..9e2b02d3 100644 --- a/win_setup/flameshot.iss +++ b/win_setup/flameshot.iss @@ -6,9 +6,9 @@ [Setup] AppName=FlameShot -AppVersion=0.7.1 +AppVersion=0.7.2 AppCopyright=NameCheap inc. -VersionInfoVersion=0.7.1 +VersionInfoVersion=0.7.2 WizardStyle=modern DefaultDirName={autopf}\FlameShot DefaultGroupName=FlameShot