1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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
|