]> git.lyx.org Git - features.git/commitdiff
Replace #warning by something that is understood by MSVC
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 16 Mar 2012 11:22:34 +0000 (12:22 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 16 Mar 2012 11:26:54 +0000 (12:26 +0100)
MSVC gives a warning when using #warning. However, it does
not show the actual warning.

src/frontends/qt4/GuiApplication.cpp
src/version.h

index 0f6c38fb834855977335bdddd1772445598158d1..e4a4797f61a4112cec662ea1de7675b1646d7152 100644 (file)
@@ -2292,7 +2292,11 @@ void GuiApplication::commitData(QSessionManager & sm)
        /// We are changing that to close all wiew one by one.
        /// FIXME: verify if the default implementation is enough now.
        #ifdef QT_NO_SESSIONMANAGER
-               #warning Qt is compiled without session manager
+               #ifndef _MSC_VER
+                       #warning Qt is compiled without session manager
+               #else
+                       #pragma message("warning: Qt is compiled without session manager")
+               #endif
                (void) sm;
        #else
                if (sm.allowsInteraction() && !closeAllViews())
index 83ce3e4b726f46d5d8b09f3c3de476f0bac4be30..e8bfd2e7b35ed872bb2bb36ab003c98755eee552 100644 (file)
@@ -34,9 +34,15 @@ extern char const * const lyx_version_info;
 #define LYX_FORMAT_TEX2LYX 428 // uwestoehr: rotated table cells
 
 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
+#ifndef _MSC_VER
 #warning "tex2lyx produces an out of date file format."
 #warning "Please update tex2lyx as soon as possible, since it depends implicitly"
 #warning "on the current file format in some places (this causes bugs like #7780)."
+#else
+#pragma message("warning: tex2lyx produces an out of date file format. " \
+       "Please update tex2lyx as soon as possible, since it depends implicitly " \
+       "on the current file format in some places (this causes bugs like #7780).")
+#endif
 #endif
 
 //} // namespace lyx