From 9b91784987831561c713aa1a57ac21ec49818d74 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 27 Jun 2017 15:47:24 +0200 Subject: QLineEdit: Tweak selectionStart() documentation Change-Id: I55defa5ed182373f435b06c92770da5b05c01459 Reviewed-by: Marc Mutz --- src/widgets/widgets/qlineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets') diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 863c1e9bbe..fa78b9203c 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -955,7 +955,7 @@ QString QLineEdit::selectedText() const } /*! - selectionStart() returns the index of the first selected character in the + Returns the index of the first selected character in the line edit or -1 if no text is selected. \sa selectedText() -- cgit v1.2.3 From 00b8050d68c337f02713d3c353ded9de094eda79 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 27 Jun 2017 15:06:24 +0200 Subject: QLineEdit: Document that []{} are reserved in Input Masks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They don't have any meaning, seems like they were meant for a future extension. Documenting them, documents that they need to be escaped. Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732 Reviewed-by: Topi Reiniƶ --- src/widgets/widgets/qlineedit.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/widgets') diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index fa78b9203c..b9b50c307b 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1186,6 +1186,7 @@ QMargins QLineEdit::textMargins() const \row \li \c > \li All following alphabetic characters are uppercased. \row \li \c < \li All following alphabetic characters are lowercased. \row \li \c ! \li Switch off case conversion. + \row \li \c {[ ] { }} \li Reserved. \row \li \tt{\\} \li Use \tt{\\} to escape the special characters listed above to use them as separators. -- cgit v1.2.3 From fb046c932f0d1c54a2baf3633de26926c939082b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 9 Jun 2017 14:46:01 -0700 Subject: Fix build with MSVC 2015 Update 2 if constexpr is enabled This compiler seems to require explicit initialization of all member variables in a constexpr constructor, even if they have an implicit default constructor of their own. We probably fixed the rest of Qt a couple of years ago, but not these two places because they were arrays and those require the C++11 syntax for uniform initialization. All compilers that support constexpr do support uniform initialization. MSVC 2015 fixed our issues with it on the same update. Change-Id: Ibc1eb23e3ae093f5c6928ded3a041be35eb9baae Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- src/widgets/widgets/qcalendarwidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/widgets/widgets') diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index c5db3a7c9a..b96492d623 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -832,7 +832,12 @@ class StaticDayOfWeekAssociativeArray { static Q_DECL_CONSTEXPR int day2idx(Qt::DayOfWeek day) Q_DECL_NOTHROW { return int(day) - 1; } // alt: day % 7 public: Q_DECL_CONSTEXPR StaticDayOfWeekAssociativeArray() Q_DECL_NOEXCEPT_EXPR(noexcept(T())) - : contained(), data() {} +#ifdef Q_COMPILER_CONSTEXPR + : contained{}, data{} // arrays require uniform initialization +#else + : contained(), data() +#endif + {} Q_DECL_CONSTEXPR bool contains(Qt::DayOfWeek day) const Q_DECL_NOTHROW { return contained[day2idx(day)]; } Q_DECL_CONSTEXPR const T &value(Qt::DayOfWeek day) const Q_DECL_NOTHROW { return data[day2idx(day)]; } -- cgit v1.2.3