File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ else (APPLE)
312312      set (CMAKE_C_FLAGS_RELWITHDEBINFO   "/MT /W4 /Zi /O2 /Ob1 /DNDEBUG" )
313313      set (CMAKE_EXE_LINKER_FLAGS          "/DYNAMICBASE:NO" )
314314   else  (MSVC )
315-       set (CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS}  -std=gnu++11" )
315+       set (CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS}  -std=gnu++11 -D_UNICODE -DUNICODE " )
316316      if  (MINGW)
317317         # -mno-ms-bitfields see #22048 
318318         set (CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}  -mno-ms-bitfields" )
Original file line number Diff line number Diff line change @@ -447,16 +447,7 @@ bool MasterScore::saveFile(bool generateBackup)
447447                  dir.mkdir (backupSubdirString);
448448#ifdef  Q_OS_WIN
449449                  const  QString backupDirNativePath = QDir::toNativeSeparators (backupDirString);
450- #if  (defined (_MSCVER) || defined (_MSC_VER))
451-    #if  (defined (UNICODE))
452-                   SetFileAttributes ((LPCTSTR)backupDirNativePath.unicode (), FILE_ATTRIBUTE_HIDDEN);
453-    #else 
454-                   //  Use byte-based Windows function
455-                   SetFileAttributes ((LPCTSTR)backupDirNativePath.toLocal8Bit (), FILE_ATTRIBUTE_HIDDEN);
456-    #endif 
457- #else 
458-                   SetFileAttributes ((LPCTSTR)backupDirNativePath.toLocal8Bit (), FILE_ATTRIBUTE_HIDDEN);
459- #endif 
450+                   SetFileAttributesW (reinterpret_cast <LPCWSTR>(backupDirNativePath.utf16 ()), FILE_ATTRIBUTE_HIDDEN);
460451#endif 
461452                  }
462453            const  QString backupName = QString (" ." fileName () + QString (" ," 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments