diff options
author | Liang Qi <liang.qi@qt.io> | 2017-03-28 09:23:03 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-03-28 09:28:31 +0200 |
commit | b48a13fd6843e12b5725aa3ff0d010007e7c43b4 (patch) | |
tree | 316cfe36fc67906efcd92ff806c7c0da56ed4f8e /src/widgets/widgets/qlineedit_p.cpp | |
parent | 3398d9d40cb0dae2dc2a1a4f7dc3b4b9cceae903 (diff) | |
parent | 15fe60cfdada84ea519f08e905d59cc3fb6d20cd (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
examples/examples.pro
tests/auto/corelib/tools/qchar/tst_qchar.cpp
tests/auto/other/qaccessibility/accessiblewidgets.h
Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
Diffstat (limited to 'src/widgets/widgets/qlineedit_p.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index 1d81d1fcb5..68be82c71d 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -534,7 +534,19 @@ QWidget *QLineEditPrivate::addAction(QAction *newAction, QAction *before, QLineE #endif } // If there is a 'before' action, it takes preference + + // There's a bug in GHS compiler that causes internal error on the following code. + // The affected GHS compiler versions are 2016.5.4 and 2017.1 + // This temporary workaround allows to compile with GHS toolchain and should be + // removed when GHS provides a patch to fix the compiler issue. + +#if defined(Q_CC_GHS) + const SideWidgetLocation loc = {position, -1}; + const auto location = before ? findSideWidget(before) : loc; +#else const auto location = before ? findSideWidget(before) : SideWidgetLocation{position, -1}; +#endif + SideWidgetEntryList &list = location.position == QLineEdit::TrailingPosition ? trailingSideWidgets : leadingSideWidgets; list.insert(location.isValid() ? list.begin() + location.index : list.end(), SideWidgetEntry(w, newAction, flags)); |