Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14389

Profile Completion is missing many tokens of qmake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • Qt Creator 3.4.0
    • Editors
    • None

    Description

      The .pro file editor highlights some tokens (variables and functions) that are used by qmake.

      But some are missing.

      In https://codereview.qt-project.org/#/c/111643/1 I added the built-in qmake functions. This was more or less easy...

      However there are a lot of variables that are not known to the completer and in consequence to the highlighter....

      I greped every string of the source files of qmake and filtered out the ones that are already present in the completer (with the related patch taken as given ...) and strings that were clearly (at least to me) not relevant:

      if (
      foundLiteral.contains("$")
      || foundLiteral.contains(".")
      || foundLiteral.contains("+")
      || foundLiteral.contains("=")
      || foundLiteral.contains("#")
      || foundLiteral.contains(" ")
      || foundLiteral.contains("%")
      || foundLiteral.contains("{")
      || foundLiteral.contains("\\")
      || foundLiteral.contains("/")
      || foundLiteral.contains(",")
      || foundLiteral.contains("-")
      || foundLiteral.contains("|")
      || foundLiteral.contains(";")
      || foundLiteral.contains("(")
      || foundLiteral.contains("'")
      || foundLiteral.contains("!")
      || foundLiteral.contains("<")
      || foundLiteral.contains("?")
      || foundLiteral.contains("@")
      || foundLiteral.contains(":")
      ) 
      ...skip this string...
      

      This reduced the list to about 1000 strings. Some seem to be clearly reserved words of qmake generator outputs.

      But there are words in the list like:

      MAKELIB
      MINGW
      MINGW_IMPORT_LIB
      MIPS
      MOCABLES
      MSBUILD
      MSBuildToolsPath
      MSBuildToolsRoot
      MSVCPROJ_COPY_DLL
      MSVCPROJ_COPY_DLL_DESC
      MSVCPROJ_INCPATH
      MSVCPROJ_TARGET
      MSVC_VER
      ...
      PRECOMPCPP
      PRECOMPH
      PRECOMPILED_DIR
      PRECOMPILED_OBJECT
      PRECOMPILED_PCH
      PRECOMPILED_SOURCE
      PRL_EXPORT_CFLAGS
      PRL_EXPORT_CXXFLAGS
      PRL_EXPORT_DEFINES
      PRODUCT_NAME
      PROJECT
      PROJECTBUILDER
      ...
      QMAKEFEATURES
      QMAKEFLAGS
      QMAKEPATH
      QMAKESPEC_ORIGINAL
      QMAKE_
      QMAKE_ABSOLUTE_SOURCE_PATH
      QMAKE_ABSOLUTE_SOURCE_ROOT
      QMAKE_AIX_SHLIB
      QMAKE_APPLICATION_BUNDLE_NAME
      QMAKE_ARGS
      QMAKE_AR_SUBLIBS
      QMAKE_BUNDLE
      QMAKE_BUNDLED_FILES
      QMAKE_BUNDLE_LOCATION
      QMAKE_BUNDLE_NAME
      QMAKE_BUNDLE_RESOURCE_FILE
      QMAKE_CC_O_FLAG
      QMAKE_CFLAGS_DEPS
      QMAKE_CFLAGS_ISYSTEM
      QMAKE_CFLAGS_PRECOMPILE
      QMAKE_CHK_EXISTS
      QMAKE_COMPILE_FLAG
      QMAKE_COMP_
      QMAKE_CURRENT_PRL_LIBS
      QMAKE_CXXFLAGS_PRECOMPILE
      QMAKE_CYGWIN_EXE
      QMAKE_CYGWIN_SHLIB
      QMAKE_DEFAULT_INCDIRS
      QMAKE_DEFAULT_LIBDIRS
      QMAKE_DIR_SEP
      QMAKE_DISTDIR
      QMAKE_DISTNAME
      QMAKE_DLL_PATHS
      QMAKE_DO_PREBINDING
      QMAKE_EXTENSION_PLUGIN
      QMAKE_EXTENSION_STATICLIB
      QMAKE_EXTRA_INCLUDES
      QMAKE_EXTRA_UNIX_COMPILERS
      QMAKE_EXTRA_UNIX_INCLUDES
      QMAKE_EXTRA_UNIX_TARGETS
      QMAKE_EXTRA_UNIX_VARIABLES
      QMAKE_EXTRA_VARIABLES
      QMAKE_EXTRA_WIN_COMPILERS
      QMAKE_EXTRA_WIN_TARGETS
      QMAKE_EXT_C
      QMAKE_EXT_CPP_MOC
      QMAKE_EXT_LIBTOOL
      QMAKE_EXT_PKGCONFIG
      QMAKE_EXT_RES
      QMAKE_FILE_BASE
      QMAKE_FILE_EXT
      QMAKE_FILE_NAME
      QMAKE_FILE_OUT
      QMAKE_FILE_OUT_BASE
      QMAKE_FILE_PATH
      QMAKE_FIX_RPATH
      QMAKE_FRAMEWORKDIR
      QMAKE_FRAMEWORKDIR_FLAGS
      QMAKE_FRAMEWORKPATH
      QMAKE_FRAMEWORKPATH_FLAGS
      QMAKE_FUNC_
      QMAKE_FUNC_FILE_IN_
      QMAKE_FUNC_FILE_OUT_
      QMAKE_HPUX_SHLIB
      QMAKE_H_MOD_MOC
      QMAKE_INCREMENTAL
      QMAKE_INCREMENTAL_STYLE
      QMAKE_INTERNAL_CACHE_FILE
      QMAKE_INTERNAL_INCLUDED_FEATURES
      QMAKE_INTERNAL_INCLUDED_FILES
      QMAKE_INTERNAL_PRL_FILE
      QMAKE_INTERNAL_PRL_LIBS
      QMAKE_IOS_DEPLOYMENT_TARGET
      QMAKE_LFLAGS_COMPAT_VERSION
      QMAKE_LFLAGS_INCREMENTAL
      QMAKE_LFLAGS_PREBIND
      QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
      QMAKE_LFLAGS_RPATHLINK
      QMAKE_LFLAGS_VERSION
      QMAKE_LIB
      QMAKE_LIBFLAGS
      QMAKE_LIBS_PRIVATE
      QMAKE_LIBTOOL
      QMAKE_LIBTOOL_DESTDIR
      QMAKE_LIBTOOL_LIBDIR
      QMAKE_LINK_OBJECT_SCRIPT
      QMAKE_LINK_O_FLAG
      QMAKE_LINK_THREAD
      QMAKE_L_FLAG
      QMAKE_MAC_XCODE_SETTINGS
      QMAKE_MANIFEST
      QMAKE_MAX_FILES_PER_AR
      QMAKE_MKDIR_CMD
      QMAKE_MKSPECS
      QMAKE_MOD_LEX
      QMAKE_MOD_MOC
      QMAKE_MOD_YACC
      QMAKE_OBJCFLAGS_PRECOMPILE
      QMAKE_OBJCXXFLAGS_PRECOMPILE
      QMAKE_ORIG_DESTDIR
      QMAKE_ORIG_TARGET
      QMAKE_PBUILDER_VERSION
      QMAKE_PBUILDER_VERSION_PLIST
      QMAKE_PBX_
      QMAKE_PBX_AGGREGATE_TARGET
      QMAKE_PBX_AGGREGATE_TARGET_DEP
      QMAKE_PBX_BUILDCONFIGS_
      QMAKE_PBX_BUILDCONFIG_
      QMAKE_PBX_BUILDPHASES
      QMAKE_PBX_BUILD_LIBRARIES
      QMAKE_PBX_BUNDLE_DATA
      QMAKE_PBX_BUNDLE_TYPE
      QMAKE_PBX_DEV_NULL_BUILD_FILE
      QMAKE_PBX_DEV_NULL_FILE_REFERENCE
      QMAKE_PBX_DUMMY_SOURCE_BUILD_PHASE
      QMAKE_PBX_GROUPS
      QMAKE_PBX_LIBPATHS
      QMAKE_PBX_LIBRARIES
      QMAKE_PBX_MAKEQMAKE_BUILDPHASE
      QMAKE_PBX_OBJ
      QMAKE_PBX_POSTLINK_BUILDPHASE
      QMAKE_PBX_PRELINK_BUILDPHASE
      QMAKE_PBX_PREPROCESS_TARGET
      QMAKE_PBX_PRESCRIPT_BUILDPHASES
      QMAKE_PBX_PRIMARY_TARGET_DEP
      QMAKE_PBX_PRODUCTS
      QMAKE_PBX_PRODUCT_TYPE
      QMAKE_PBX_SUBDIRS
      QMAKE_PBX_SUBLIBS_BUILDPHASE
      QMAKE_PBX_TARGET
      QMAKE_PBX_TARGETS
      QMAKE_PBX_TARGET_ATTRIBUTES_
      QMAKE_PBX_TARGET_COPY_PHASE
      QMAKE_PBX_TARGET_DEPENDS
      QMAKE_PBX_TEST_BUNDLE_BUILDCONFIG_
      QMAKE_PBX_TEST_BUNDLE_BUILDCONFIG_LIST
      QMAKE_PBX_TEST_TARGET
      QMAKE_PBX_VARS
      QMAKE_PCH_OUTPUT_EXT
      QMAKE_PKGCONFIG_CFLAGS
      QMAKE_PKGCONFIG_DESCRIPTION
      QMAKE_PKGCONFIG_DESTDIR
      QMAKE_PKGCONFIG_FILE
      QMAKE_PKGCONFIG_INCDIR
      QMAKE_PKGCONFIG_INSTALL_REPLACE
      QMAKE_PKGCONFIG_LIBDIR
      QMAKE_PKGCONFIG_NAME
      QMAKE_PKGCONFIG_PREFIX
      QMAKE_PKGCONFIG_REQUIRES
      QMAKE_PKGCONFIG_VARIABLES
      QMAKE_PKGCONFIG_VERSION
      QMAKE_PKGINFO
      QMAKE_PKGINFO_TYPEINFO
      QMAKE_PLATFORM
      QMAKE_PLUGIN_BUNDLE_NAME
      QMAKE_POST_BUILD
      QMAKE_PRECOMP_PREFIX
      QMAKE_PREFIX_SHLIB
      QMAKE_PREFIX_STATICLIB
      QMAKE_PRL_BUILD_DIR
      QMAKE_PRL_CONFIG
      QMAKE_PRL_DEFINES
      QMAKE_PRL_INSTALL_REPLACE
      QMAKE_PRL_INTERNAL_FILES
      QMAKE_PRL_LIBS
      QMAKE_PRL_TARGET
      QMAKE_PRL_VERSION
      QMAKE_PROJECT_DEPTH
      QMAKE_RANLIB
      QMAKE_RC
      QMAKE_RPATHLINKDIR
      QMAKE_RUN_
      QMAKE_RUN_CC_IMP_BATCH
      QMAKE_RUN_CXX_IMP_BATCH
      QMAKE_SONAME_PREFIX
      QMAKE_SPEC
      QMAKE_STRIP
      QMAKE_STRIPFLAGS_APP
      QMAKE_STRIPFLAGS_LIB
      QMAKE_SUBDIR_AGGREGATE_TARGET
      QMAKE_SUBDIR_PBX_BUILDCONFIGS
      QMAKE_SUBDIR_PBX_BUILDCONFIG_
      QMAKE_SUBDIR_PBX_GROUPS
      QMAKE_SUBDIR_PBX_HEIR_GROUP
      QMAKE_SUBSTITUTES
      QMAKE_TARGET_BUNDLE_PREFIX
      QMAKE_TARGET_COMPANY
      QMAKE_TARGET_COPYRIGHT
      QMAKE_TARGET_DESCRIPTION
      QMAKE_TARGET_OS
      QMAKE_TARGET_PRODUCT
      QMAKE_TEST_BUNDLE_REFERENCE
      QMAKE_UUID
      QMAKE_VAR_
      QMAKE_VAR_FIRST_
      QMAKE_VERSION
      QMAKE_WINDEPLOYQT
      QMAKE_WRITE_DEFAULT_RC
      QMAKE_XCODE_ARCHS
      QMAKE_XCODE_CODE_SIGN_IDENTITY
      QMAKE_XCODE_GCC_VERSION
      QMAKE_XCODE_LIBRARY_SUFFIX
      QMAKE_XCODE_LIBRARY_SUFFIX_SETTING
      QMAKE_XCODE_SPECDIR
      QMAKE_XSPEC
      QT_
      QT_CE_C_RUNTIME
      QT_HOST_
      QT_HOST_BINS
      QT_HOST_DATA
      QT_HOST_LIBS
      QT_HOST_PREFIX
      QT_INSTALL_
      QT_INSTALL_ARCHDATA
      QT_INSTALL_BINS
      QT_INSTALL_CONFIGURATION
      QT_INSTALL_DATA
      QT_INSTALL_DEMOS
      QT_INSTALL_DOCS
      QT_INSTALL_EXAMPLES
      QT_INSTALL_HEADERS
      QT_INSTALL_IMPORTS
      QT_INSTALL_LIBEXECS
      QT_INSTALL_LIBS
      QT_INSTALL_PLUGINS
      QT_INSTALL_PREFIX
      QT_INSTALL_QML
      QT_INSTALL_TESTS
      QT_INSTALL_TRANSLATIONS
      QT_SYSROOT
      ...
      RC_CODEPAGE
      RC_ICONS
      RC_INCLUDEPATH
      RC_LANG
      ...
      

      For a full listing please have a look at the attached list.

      Some of them are even documented in the qmake docs.

      Maybe someone like Oswald Buddenhagen could "run" over the list and make some check-marks of the ones, he thinks should be in.

      But I think at least the tokens that are documented should be in...

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kandeler Christian Kandeler
              moellney Michael Möllney
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes