Replace #warning by something that is understood by MSVC

MSVC gives a warning when using #warning. However, it does
not show the actual warning.
This commit is contained in:
Vincent van Ravesteijn 2012-03-16 12:22:34 +01:00
parent 234ba2c419
commit ea506d6a67
2 changed files with 11 additions and 1 deletions

View 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())

View 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