diff options
-rw-r--r-- | attachments.cpp | 12 | ||||
-rw-r--r-- | gpg4usb.pro | 6 | ||||
-rwxr-xr-x | qmake-windows.sh | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/attachments.cpp b/attachments.cpp index f9d95aa..7480429 100644 --- a/attachments.cpp +++ b/attachments.cpp @@ -135,12 +135,12 @@ void Attachments::saveByteArrayToFile(QByteArray outBuffer, QString filename) */ void Attachments::openFile() { - QString tmpPath = qApp->applicationDirPath() + "/attachments/"; + QString attachmentDir = qApp->applicationDirPath() + "/attachments/"; //QDir p = QDir(qApp->applicationDirPath() + "/attachments/"); - //if(!p.exists()) { - // qDebug() << "creating " << p; - // p.mkpath("/attachments/"); - //} + if(!QDir(attachmentDir).exists()) { + qDebug() << "creating " << attachmentDir; + QDir().mkpath(attachmentDir); + } QModelIndexList indexes = tableView->selectionModel()->selection().indexes(); MimePart mp = table->getMimePart(indexes.at(0).row()); @@ -152,7 +152,7 @@ void Attachments::openFile() { qDebug() << "file: " << filename; filename.chop(1); filename.remove(0, 1); - filename.prepend(tmpPath); + filename.prepend(attachmentDir); qDebug() << "file: " << filename; QByteArray outBuffer = QByteArray::fromBase64(mp.body); diff --git a/gpg4usb.pro b/gpg4usb.pro index 8265221..891aa43 100644 --- a/gpg4usb.pro +++ b/gpg4usb.pro @@ -11,8 +11,8 @@ DEPENDPATH += . INCLUDEPATH += . \ ./include -# CONFIG += release static -CONFIG += debug +CONFIG += release static +# CONFIG += debug # Input HEADERS += attachments.h \ @@ -42,7 +42,7 @@ RC_FILE = gpg4usb.rc # comment out line below for static building LIBS += -lgpgme \ - -lgpg-error + -lgpg-error DEFINES += _FILE_OFFSET_BITS=64 TRANSLATIONS = release/ts/gpg4usb_en.ts \ release/ts/gpg4usb_de.ts \ diff --git a/qmake-windows.sh b/qmake-windows.sh index dbfc5ba..95a45a9 100755 --- a/qmake-windows.sh +++ b/qmake-windows.sh @@ -2,7 +2,8 @@ qtwind="$(pwd)/winbuild/qt4.5" qtx11d="$(pwd)/linbuild/qt4.5" -mingwb="$(ls /usr/ | grep mingw32 | head --lines 1)" - +#mingwb="$(ls /usr/ | grep mingw32 | head --lines 1)" +mingwb=i586-mingw32msvc + $qtx11d/bin/qmake -spec $qtx11d/mkspecs/win32-g++ "TARGET=start_windows" "INCLUDEPATH += ./winbuild/include" "LIBS +=./winbuild/lib/libgpgme.a ./winbuild/lib/libgpg-error.a" "DEFINES += STATICWINDOWS" "QMAKE_CC = $mingwb-gcc -m32" "QMAKE_CXX = $mingwb-g++ -m32" "QMAKE_INCDIR_QT = $qtwind/include" "QMAKE_LIBDIR_QT = $qtwind/lib" "QMAKE_LINK = $mingwb-g++" "QMAKE_COPY_DIR = cp -r" "QMAKE_COPY = cp" "QMAKE_COPY_DIR = cp -r" "QMAKE_MOVE = mv" "QMAKE_DEL_FILE = rm" "QMAKE_CHK_DIR_EXISTS = test -d" "QMAKE_QMAKE = $qtx11d/bin/qmake" "QMAKE_MOC = $qtx11d/bin/moc" "QMAKE_UIC = $qtx11d/bin/uic" "QMAKE_RCC = $qtx11d/bin/rcc" "QMAKE_RC = $mingwb-windres" "QMAKE_LFLAGS += -Wl,-subsystem,windows" "$@" |