diff -r db677d321cf4 -r 2c368cf5cc19 src/misc.cpp
--- a/src/misc.cpp Fri Jun 05 19:13:44 2015 +0300
+++ b/src/misc.cpp Sat Jun 06 22:03:00 2015 +0300
@@ -16,8 +16,13 @@
* along with this program. If not, see .
*/
+#include
+#include
#include "misc.h"
-#include
+
+//
+// -----------------------------------------------------------------------------
+//
uint32 makeByteID (uint8 a, uint8 b, uint8 c, uint8 d)
{
@@ -37,19 +42,6 @@
// -----------------------------------------------------------------------------
//
-void addVersion (const ZandronumVersion& version)
-{
- QList versions = getVersions();
- QVariant var;
- var.setValue (version);
- versions.append (var);
- Config::set ("versions", versions);
-}
-
-//
-// -----------------------------------------------------------------------------
-//
-
QString basename (const QString& path)
{
int lastpos = path.lastIndexOf ("/");
@@ -68,4 +60,20 @@
{
return QMessageBox::question (NULL, QObject::tr ("Confirm"), text,
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::No;
+}
+
+//
+// -------------------------------------------------------------------------------------------------
+//
+
+QString getBinaryPath (QWidget* parent)
+{
+#ifdef _WIN32
+# define ZAN_EXE_NAME "zandronum.exe"
+#else
+# define ZAN_EXE_NAME "zandronum"
+#endif
+
+ return QFileDialog::getOpenFileName (parent, "", "",
+ "Zandronum Binaries (" ZAN_EXE_NAME ")(" ZAN_EXE_NAME ");;All files (*)(*)");
}
\ No newline at end of file