remove pointless ifdefs

configure always defines all of these constants. the exception is
SettingsPath which is unix-only, so make the #ifdef explicit about that.

Change-Id: I339d2d7cb9d188a8e74d79310c3a80b5d4dbb806
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2012-02-28 09:54:53 +01:00 committed by Qt by Nokia
parent 8516194633
commit da08210494

View File

@ -226,66 +226,44 @@ QLibraryInfo::location(LibraryLocation loc)
if(!QLibraryInfoPrivate::configuration()) { if(!QLibraryInfoPrivate::configuration()) {
const char *path = 0; const char *path = 0;
switch (loc) { switch (loc) {
#ifdef QT_CONFIGURE_PREFIX_PATH
case PrefixPath: case PrefixPath:
path = QT_CONFIGURE_PREFIX_PATH; path = QT_CONFIGURE_PREFIX_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_DOCUMENTATION_PATH
case DocumentationPath: case DocumentationPath:
path = QT_CONFIGURE_DOCUMENTATION_PATH; path = QT_CONFIGURE_DOCUMENTATION_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_HEADERS_PATH
case HeadersPath: case HeadersPath:
path = QT_CONFIGURE_HEADERS_PATH; path = QT_CONFIGURE_HEADERS_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_LIBRARIES_PATH
case LibrariesPath: case LibrariesPath:
path = QT_CONFIGURE_LIBRARIES_PATH; path = QT_CONFIGURE_LIBRARIES_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_BINARIES_PATH
case BinariesPath: case BinariesPath:
path = QT_CONFIGURE_BINARIES_PATH; path = QT_CONFIGURE_BINARIES_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_PLUGINS_PATH
case PluginsPath: case PluginsPath:
path = QT_CONFIGURE_PLUGINS_PATH; path = QT_CONFIGURE_PLUGINS_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_IMPORTS_PATH
case ImportsPath: case ImportsPath:
path = QT_CONFIGURE_IMPORTS_PATH; path = QT_CONFIGURE_IMPORTS_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_DATA_PATH
case DataPath: case DataPath:
path = QT_CONFIGURE_DATA_PATH; path = QT_CONFIGURE_DATA_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_TRANSLATIONS_PATH
case TranslationsPath: case TranslationsPath:
path = QT_CONFIGURE_TRANSLATIONS_PATH; path = QT_CONFIGURE_TRANSLATIONS_PATH;
break; break;
#endif #ifndef Q_OS_WIN // On Windows we use the registry
#ifdef QT_CONFIGURE_SETTINGS_PATH
case SettingsPath: case SettingsPath:
path = QT_CONFIGURE_SETTINGS_PATH; path = QT_CONFIGURE_SETTINGS_PATH;
break; break;
#endif #endif
#ifdef QT_CONFIGURE_EXAMPLES_PATH
case ExamplesPath: case ExamplesPath:
path = QT_CONFIGURE_EXAMPLES_PATH; path = QT_CONFIGURE_EXAMPLES_PATH;
break; break;
#endif
#ifdef QT_CONFIGURE_TESTS_PATH
case TestsPath: case TestsPath:
path = QT_CONFIGURE_TESTS_PATH; path = QT_CONFIGURE_TESTS_PATH;
break; break;
#endif
default: default:
break; break;
} }