From 43c652b63a83934543fa2716fc08c8ff2d1b0ffc Mon Sep 17 00:00:00 2001 From: Christian Kaiser Date: Sat, 20 Feb 2016 23:56:23 -0300 Subject: [PATCH] Fixed mHasTaskbarButton not being initialized. Removed addToRecentDocs (XP compat). --- lightscreenwindow.cpp | 3 ++- tools/os.cpp | 18 ------------------ tools/os.h | 3 --- tools/screenshot.cpp | 2 -- 4 files changed, 2 insertions(+), 24 deletions(-) diff --git a/lightscreenwindow.cpp b/lightscreenwindow.cpp index f65f478..b6c5608 100644 --- a/lightscreenwindow.cpp +++ b/lightscreenwindow.cpp @@ -63,7 +63,8 @@ LightscreenWindow::LightscreenWindow(QWidget *parent) : mWasVisible(true), mLastMessage(0), mLastMode(-1), - mLastScreenshot() + mLastScreenshot(), + mHasTaskbarButton(false) { ui.setupUi(this); diff --git a/tools/os.cpp b/tools/os.cpp index a620fb7..041c9ee 100644 --- a/tools/os.cpp +++ b/tools/os.cpp @@ -54,24 +54,6 @@ #include "os.h" -void os::addToRecentDocuments(QString fileName) -{ -#ifdef Q_OS_WIN - LPCWSTR szFileName = QDir::toNativeSeparators(fileName).toStdWString().c_str(); - SHARDAPPIDINFO info; - IShellItem* item; - - if (SUCCEEDED(SHCreateItemFromParsingName(szFileName, NULL, IID_PPV_ARGS(&item)))) { - info.psi = item; - info.pszAppID = L"K.Lightscreen"; // our AppID - see above - - SHAddToRecentDocs (SHARD_APPIDINFO, &info); - } -#else - Q_UNUSED(fileName) -#endif -} - QPixmap os::cursor() { #ifdef Q_OS_WIN diff --git a/tools/os.h b/tools/os.h index e3edc6f..5b0a4b1 100644 --- a/tools/os.h +++ b/tools/os.h @@ -35,9 +35,6 @@ class QIcon; namespace os { - // Adds the filename to the Windows recent document list (useful for Windows 7 jump lists) - void addToRecentDocuments(QString fileName); - // Returns the cursor pixmap in Windows QPixmap cursor(); diff --git a/tools/screenshot.cpp b/tools/screenshot.cpp index 7608bb4..aa60720 100644 --- a/tools/screenshot.cpp +++ b/tools/screenshot.cpp @@ -271,8 +271,6 @@ void Screenshot::save() else { result = Screenshot::Fail; } - - os::addToRecentDocuments(fileName); } mOptions.fileName = fileName;