Skip to content

Commit

Permalink
Merge pull request #37 from rdoeffinger/webdav_fix
Browse files Browse the repository at this point in the history
Re-enable Windows WebDAV support.
  • Loading branch information
annejan committed May 2, 2015
2 parents 24f8dec + 30dac96 commit 6c753af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QTimer>
#ifdef Q_OS_WIN
#include <windows.h>
#include <winnetwk.h>
#undef DELETE
#endif

Expand All @@ -35,9 +36,7 @@ MainWindow::MainWindow(QWidget *parent) :
MainWindow::~MainWindow()
{
#ifdef Q_OS_WIN
#ifndef __MINGW32__
if (useWebDav) WNetCancelConnection2A(passStore.toUtf8().constData(), 0, 1);
#endif
#else
if (fusedav.state() == QProcess::Running) {
fusedav.terminate();
Expand Down Expand Up @@ -66,7 +65,6 @@ QSettings &MainWindow::getSettings() {

void MainWindow::mountWebDav() {
#ifdef Q_OS_WIN
#ifndef __MINGW32__
char dst[20] = {0};
NETRESOURCEA netres;
memset(&netres, 0, sizeof(netres));
Expand All @@ -85,7 +83,6 @@ void MainWindow::mountWebDav() {
ui->textBrowser->setTextColor(Qt::red);
ui->textBrowser->setText(tr("Failed to connect WebDAV:\n") + message + " (0x" + QString::number(r, 16) + ")");
}
#endif
#else
fusedav.start("fusedav -o nonempty -u \"" + webDavUser + "\" " + webDavUrl + " \"" + passStore + '"');
fusedav.waitForStarted();
Expand Down
2 changes: 1 addition & 1 deletion qtpass.pro
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ win32 {
static {
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
}
QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat
QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat -lmpr
} else:macx {
ICON = artwork/icon.icns
}
Expand Down

0 comments on commit 6c753af

Please sign in to comment.