diff options
| author | Semih Yavuz <semih.yavuz@qt.io> | 2025-01-24 13:23:35 +0100 |
|---|---|---|
| committer | Semih Yavuz <semih.yavuz@qt.io> | 2025-01-29 20:37:53 +0100 |
| commit | 2dec2d82d0b99ac469ec29a1a92b7da3476f71fa (patch) | |
| tree | e17488150b653d30658ce407ff8214b8213396ef /src/qmlformat/qqmlformatoptions.cpp | |
| parent | 0cde2a84b9ed6a076092efc633bfb8006acb3c56 (diff) | |
qmlformat: don't build if commandlineparser not found
Task-number: QTBUG-133225
Change-Id: I8d21d16cc90e50b2ef56fcaeed5b8c3933ecbc9b
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src/qmlformat/qqmlformatoptions.cpp')
| -rw-r--r-- | src/qmlformat/qqmlformatoptions.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/qmlformat/qqmlformatoptions.cpp b/src/qmlformat/qqmlformatoptions.cpp index 52bcd444c7..92b9a31f35 100644 --- a/src/qmlformat/qqmlformatoptions.cpp +++ b/src/qmlformat/qqmlformatoptions.cpp @@ -4,10 +4,8 @@ #include "qqmlformatoptions_p.h" #include "qqmlformatsettings_p.h" -#if QT_CONFIG(commandlineparser) -# include <QCommandLineParser> -# include <QCommandLineOption> -#endif +#include <QCommandLineParser> +#include <QCommandLineOption> using namespace Qt::StringLiterals; @@ -115,7 +113,6 @@ void QQmlFormatOptions::applySettings(const QQmlFormatSettings &settings) QQmlFormatOptions QQmlFormatOptions::buildCommandLineOptions(const QStringList &args) { QQmlFormatOptions options; -#if QT_CONFIG(commandlineparser) QCommandLineParser parser; parser.setApplicationDescription( "Formats QML files according to the QML Coding Conventions."_L1); @@ -263,7 +260,6 @@ QQmlFormatOptions QQmlFormatOptions::buildCommandLineOptions(const QStringList & options.mark(Settings::MaxColumnWidth); options.setMaxColumnWidth(maxColumnWidth); } -#endif return options; } |
