File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ elseif(CC_IS_MINGW)
5353 set (CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware" )
5454 endif (NOT BUILD_64)
5555
56+ add_definitions (-D_UNICODE)
57+ add_definitions (-DUNICODE)
58+
5659elseif (CC_IS_CLANG)
5760 message (STATUS "Using Compiler CLANG ${CMAKE_CXX_COMPILER_VERSION} " )
5861
Original file line number Diff line number Diff line change @@ -449,16 +449,7 @@ bool MasterScore::saveFile(bool generateBackup)
449449 dir.mkdir (backupSubdirString);
450450#ifdef Q_OS_WIN
451451 const QString backupDirNativePath = QDir::toNativeSeparators (backupDirString);
452- #if (defined (_MSCVER) || defined (_MSC_VER))
453- #if (defined (UNICODE))
454- SetFileAttributes ((LPCTSTR)backupDirNativePath.unicode (), FILE_ATTRIBUTE_HIDDEN);
455- #else
456- // Use byte-based Windows function
457- SetFileAttributes ((LPCTSTR)backupDirNativePath.toLocal8Bit (), FILE_ATTRIBUTE_HIDDEN);
458- #endif
459- #else
460- SetFileAttributes ((LPCTSTR)backupDirNativePath.toLocal8Bit (), FILE_ATTRIBUTE_HIDDEN);
461- #endif
452+ SetFileAttributes (reinterpret_cast <LPCTSTR>(backupDirNativePath.unicode ()->unicode ()), FILE_ATTRIBUTE_HIDDEN);
462453#endif
463454 }
464455 const QString backupName = QString (" ." ) + info.fileName () + QString (" ," );
You can’t perform that action at this time.
0 commit comments