Commits

joac...@c8aa9fed-2811-0410-8543-893ada326672  committed 55bf0a5

Improvements for compilation on Windows

  • Participants
  • Parent commits 0de159d

Comments (0)

Files changed (4)

File kdiff3/src-QT4/ccInstHelper.cpp

 #endif
 
 struct ReplacementItem
-{ char* fileType; char* operationType; };
+{ const char* fileType; const char* operationType; };
 
 ReplacementItem g_replacementTable[] = {
    {"text_file_delta",   "xcompare"},

File kdiff3/src-QT4/fileaccess.cpp

 #else
          QString pattern ="*.*";
          WIN32_FIND_DATA findData;
-         WIN32_FIND_DATAA& findDataA=*(WIN32_FIND_DATAA*)&findData;  // Needed for Win95
 
-         Qt::HANDLE searchHandle = QT_WA_INLINE(
-                 FindFirstFile( (TCHAR*)pattern.utf16(), &findData ),
-                 FindFirstFileA( pattern.toLocal8Bit(), &findDataA )
-              );
+         Qt::HANDLE searchHandle = FindFirstFileW( (const wchar_t*)pattern.utf16(), &findData );
 
          if ( searchHandle != INVALID_HANDLE_VALUE )
          {
             {
                if (!bFirst)
                {
-                  if ( ! QT_WA_INLINE(
-                            FindNextFile(searchHandle,&findData),
-                            FindNextFileA(searchHandle,&findDataA)) )
+                  if ( ! FindNextFileW(searchHandle,&findData) )
                      break;
                }
                bFirst = false;
                FileAccess fa;
 
-               fa.m_filePath = QT_WA_INLINE(
-                  QString::fromUtf16((const ushort*)findData.cFileName),
-                  QString::fromLocal8Bit(findDataA.cFileName)
-                  );
+               fa.m_filePath = QString::fromUtf16((const ushort*)findData.cFileName);
                if ( fa.m_filePath!="." && fa.m_filePath!=".." )
                {               
                   fa.m_size = ( qint64( findData.nFileSizeHigh ) << 32 ) + findData.nFileSizeLow;

File kdiff3/src-QT4/gnudiff_io.cpp

       else
       {
          while ( t1!=s1end &&
-                 ( bIgnoreWhiteSpace && isWhite( *t1 )  ||
-                   bIgnoreNumbers    && (t1->isDigit() || *t1=='-' || *t1=='.' )))
+                 ( (bIgnoreWhiteSpace && isWhite( *t1 ))  ||
+                   (bIgnoreNumbers    && (t1->isDigit()  || *t1=='-' || *t1=='.' ))))
          {
             ++t1;
          }
 
          while ( t2 != s2end &&
-                 ( bIgnoreWhiteSpace && isWhite( *t2 )  ||
-                   bIgnoreNumbers    && (t2->isDigit() || *t2=='-' || *t2=='.' )))
+                 ( (bIgnoreWhiteSpace && isWhite( *t2 ))  ||
+                   (bIgnoreNumbers    && (t2->isDigit() || *t2=='-' || *t2=='.' ))))
          {
             ++t2;
          }
 	  case IGNORE_ALL_SPACE:
 	    while ( p<bufend && (c = *p) != '\n' )
             {
-	      if (! (isWhite(c) || bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) ))
+          if (! (isWhite(c) || (bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' )) ))
                   h = HASH (h, c.toLower().unicode());
               ++p;
             }            
 	  case IGNORE_ALL_SPACE:
 	    while ( p<bufend && (c = *p) != '\n')
             {
-	      if (! (isWhite(c)|| bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) ))
+          if (! (isWhite(c)|| (bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' )) ))
                  h = HASH (h, c.unicode());
               ++p;
             }

File kdiff3/src-QT4/optiondialog.cpp

    emit applyDone();
 
 #ifdef _WIN32
-   QString locale = m_language;
+   QString locale = m_options.m_language;
    if ( locale == "Auto" || locale.isEmpty() )
       locale = QLocale::system().name().left(2);
    int spacePos = locale.indexOf(' ');