Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable Windows WebDAV support. #37

Merged
merged 1 commit into from
May 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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