diff options
Diffstat (limited to 'drawpile103.patch')
-rw-r--r-- | drawpile103.patch | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/drawpile103.patch b/drawpile103.patch new file mode 100644 index 000000000000..eba1428fcd89 --- /dev/null +++ b/drawpile103.patch @@ -0,0 +1,111 @@ +diff --git a/ChangeLog b/ChangeLog +index feb0daf..76d59d9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2015-1?-?? Version 1.0.3 ++ * Remember last used path when saving files ++ * Support new miniupnpc library version ++ + 2015-09-13 Version 1.0.2 + * Fixed crash when smoother was set to zero + * Server: added command line option to enable split recording mode (new recording for each snapshot) +diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt +index 30dde26..9bbf5f2 100644 +--- a/src/client/CMakeLists.txt ++++ b/src/client/CMakeLists.txt +@@ -212,6 +212,7 @@ else() + ) + qt5_add_resources( QtResource bundled/QtColorWidgets/color_widgets.qrc ) + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/bundled/QtColorWidgets") ++ add_definitions(-DQTCOLORPICKER_STATICALLY_LINKED) + endif() + + qt5_wrap_ui( UI_Headers ${UIs} ) +diff --git a/src/client/bundled/QtColorWidgets/color_utils.cpp b/src/client/bundled/QtColorWidgets/color_utils.cpp +index b153158..1d829d6 100644 +--- a/src/client/bundled/QtColorWidgets/color_utils.cpp ++++ b/src/client/bundled/QtColorWidgets/color_utils.cpp +@@ -22,6 +22,8 @@ + */ + #include "color_utils.hpp" + ++#include <cmath> ++ + namespace color_widgets { + namespace detail { + +diff --git a/src/client/mainwindow.cpp b/src/client/mainwindow.cpp +index 5e15177..645326a 100644 +--- a/src/client/mainwindow.cpp ++++ b/src/client/mainwindow.cpp +@@ -104,8 +104,8 @@ + namespace { + + QString getLastPath() { +- QSettings cfg; +- return cfg.value("window/lastpath").toString(); ++ QFileInfo fi(QSettings().value("window/lastpath").toString()); ++ return fi.absoluteDir().absolutePath(); + } + + void setLastPath(const QString &lastpath) { +@@ -918,13 +918,8 @@ void MainWindow::open() + QApplication::tr("All Files (*)"); + + // Get the file name to open +-#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)) +- const QUrl file = QFileDialog::getOpenFileUrl(this, +- tr("Open Image"), getLastPath(), filter); +-#else + const QUrl file = QUrl::fromLocalFile(QFileDialog::getOpenFileName(this, + tr("Open Image"), getLastPath(), filter)); +-#endif + + // Open the file if it was selected + if(file.isValid()) { +@@ -1035,7 +1030,6 @@ bool MainWindow::saveas() + // Get the file name + QString file = QFileDialog::getSaveFileName(this, + tr("Save Image"), getLastPath(), filter.join(";;"), &selfilter); +- + if(file.isEmpty()==false) { + + // Set file suffix if missing +@@ -1073,6 +1067,8 @@ bool MainWindow::saveas() + _autosave->setEnabled(true); + setWindowModified(false); + updateTitle(); ++ setLastPath(file); ++ addRecentFile(file); + return true; + } + } +diff --git a/src/client/net/upnp.cpp b/src/client/net/upnp.cpp +index f31c972..543432a 100644 +--- a/src/client/net/upnp.cpp ++++ b/src/client/net/upnp.cpp +@@ -92,7 +92,11 @@ bool UPnPClient::doDiscover() + return true; + + int error; ++#if MINIUPNPC_API_VERSION < 14 + d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, &error); ++#else ++ d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, &error); ++#endif + if(!d->devices) { + qWarning("UPnP: Error (%d) discovering devices!", error); + return false; +diff --git a/src/shared/bundled/karchive/karchive_bundled.h b/src/shared/bundled/karchive/karchive_bundled.h +index 29cffdd..78c9f86 100644 +--- a/src/shared/bundled/karchive/karchive_bundled.h ++++ b/src/shared/bundled/karchive/karchive_bundled.h +@@ -28,6 +28,7 @@ + #include <QtCore/QString> + #include <QtCore/QStringList> + #include <QtCore/QHash> ++#include <QtCore/QIODevice> + + #ifdef Q_OS_WIN + #include <qplatformdefs.h> // mode_t |