mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-04 12:11:33 +02:00
Compare commits
5 Commits
v1.5.0-bet
...
v1.5.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3620e320b | ||
|
|
883576cb95 | ||
|
|
62ec7aa9c5 | ||
|
|
99fc570267 | ||
|
|
1f5c4bde14 |
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
|
||||
|
||||
Mirall::Application app(argc, argv);
|
||||
app.initialize();
|
||||
#ifndef Q_OS_WIN32
|
||||
#ifndef Q_OS_WIN
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
if( app.giveHelp() ) {
|
||||
|
||||
@@ -390,7 +390,7 @@ void AccountSettings::slotFolderOpenAction( const QString& alias )
|
||||
QUrl url(f->path(), QUrl::TolerantMode);
|
||||
url.setScheme( QLatin1String("file") );
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
// work around a bug in QDesktopServices on Win32, see i-net
|
||||
QString filePath = f->path();
|
||||
|
||||
@@ -490,7 +490,7 @@ void AccountSettings::slotUpdateFolderState( Folder *folder )
|
||||
|
||||
//void AccountSettings::slotOCInfo( const QString& url, const QString& versionStr, const QString& version, const QString& )
|
||||
//{
|
||||
//#ifdef Q_OS_WIN32
|
||||
//#ifdef Q_OS_WIN
|
||||
// // work around a bug in QDesktopServices on Win32, see i-net
|
||||
// QString filePath = url;
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ QString applicationTrPath()
|
||||
#ifdef Q_OS_MAC
|
||||
return QApplication::applicationDirPath()+QLatin1String("/../Resources/Translations"); // path defaults to app dir.
|
||||
#endif
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
return QApplication::applicationDirPath();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ void ownCloudGui::slotFolderOpenAction( const QString& alias )
|
||||
QUrl url(f->path(), QUrl::TolerantMode);
|
||||
url.setScheme( QLatin1String("file") );
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
// work around a bug in QDesktopServices on Win32, see i-net
|
||||
QString filePath = f->path();
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#endif
|
||||
|
||||
// We use some internals of csync:
|
||||
extern "C" int c_utimes(const char *, const struct timeval *);
|
||||
extern "C" void csync_win32_set_file_hidden( const char *file, bool h );
|
||||
@@ -333,7 +338,7 @@ void PropagateUploadFile::start()
|
||||
state = hbf_splitlist(trans.data(), file.handle());
|
||||
|
||||
if (progressInfo._valid) {
|
||||
if (progressInfo._modtime.toTime_t() == _item._modtime) {
|
||||
if (progressInfo._modtime.toTime_t() == (uint)_item._modtime) {
|
||||
trans->start_id = progressInfo._chunk;
|
||||
trans->transfer_id = progressInfo._transferid;
|
||||
}
|
||||
@@ -786,7 +791,7 @@ void PropagateDownloadFile::start()
|
||||
|
||||
csync_win32_set_file_hidden(tmpFileName.toUtf8().constData(), false);
|
||||
|
||||
#ifndef QT_OS_WIN
|
||||
#ifndef Q_OS_WIN
|
||||
bool success;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
success = tmpFile.fileEngine()->rename(fn);
|
||||
@@ -804,10 +809,12 @@ void PropagateDownloadFile::start()
|
||||
done(SyncFileItem::NormalError, tmpFile.errorString());
|
||||
return;
|
||||
}
|
||||
#else //QT_OS_WIN
|
||||
if (::MoveFileEx((wchar_t*)tmpFile.fileName().utf16(),
|
||||
(wchar_t*)QString(_localDir + item._file).utf16(),
|
||||
MOVEFILE_REPLACE_EXISTING) != 0) {
|
||||
#else //Q_OS_WIN
|
||||
BOOL ok;
|
||||
ok = MoveFileEx((wchar_t*)tmpFile.fileName().utf16(),
|
||||
(wchar_t*)QString(_propagator->_localDir + _item._file).utf16(),
|
||||
MOVEFILE_REPLACE_EXISTING+MOVEFILE_COPY_ALLOWED+MOVEFILE_WRITE_THROUGH);
|
||||
if (!ok) {
|
||||
wchar_t *string = 0;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
|
||||
@@ -48,7 +48,7 @@ void UpdateDetector::versionCheck( Theme *theme )
|
||||
#ifdef Q_OS_LINUX
|
||||
platform = QLatin1String("linux");
|
||||
#endif
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
platform = QLatin1String( "win32" );
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
@@ -104,7 +104,7 @@ QString Utility::octetsToString( qint64 octets )
|
||||
// Qtified version of get_platforms() in csync_owncloud.c
|
||||
QString Utility::platform()
|
||||
{
|
||||
#if defined(Q_OS_WIN32)
|
||||
#if defined(Q_OS_WIN)
|
||||
return QLatin1String("Windows");
|
||||
#elif defined(Q_OS_MAC)
|
||||
return QLatin1String("Macintosh");
|
||||
|
||||
Reference in New Issue
Block a user