From ea506d6a67375d28677475972f7ab18e9e884e26 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 16 Mar 2012 12:22:34 +0100 Subject: [PATCH] Replace #warning by something that is understood by MSVC MSVC gives a warning when using #warning. However, it does not show the actual warning. --- src/frontends/qt4/GuiApplication.cpp | 6 +++++- src/version.h | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 0f6c38fb83..e4a4797f61 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -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()) diff --git a/src/version.h b/src/version.h index 83ce3e4b72..e8bfd2e7b3 100644 --- a/src/version.h +++ b/src/version.h @@ -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 -- 2.39.2