The removed class was evidently attempting to promote protected members
of its base class to public, but the way this was done doesn't work and
doing so wasn't actually necessary for the test.
Change-Id: I15e0c31891da08cacee1054e15596a79a058b466
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
void assignOperator();
};
void assignOperator();
};
-// Subclass that exposes the protected functions.
-class SubQStringMatcher : public QStringMatcher
-{
-public:
-};
-
void tst_QStringMatcher::qstringmatcher()
{
void tst_QStringMatcher::qstringmatcher()
{
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
QCOMPARE(matcher.indexIn("foo", 1), 1);
QCOMPARE(matcher.pattern(), QString());
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
QCOMPARE(matcher.indexIn("foo", 1), 1);
QCOMPARE(matcher.pattern(), QString());
// public Qt::CaseSensitivity caseSensitivity() const
void tst_QStringMatcher::caseSensitivity()
{
// public Qt::CaseSensitivity caseSensitivity() const
void tst_QStringMatcher::caseSensitivity()
{
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setCaseSensitivity(Qt::CaseSensitive);
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
matcher.setCaseSensitivity(Qt::CaseSensitive);
QCOMPARE(matcher.caseSensitivity(), Qt::CaseSensitive);
QFETCH(int, from);
QFETCH(int, indexIn);
QFETCH(int, from);
QFETCH(int, indexIn);
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setPattern(needle);
QCOMPARE(matcher.indexIn(haystack, from), indexIn);
matcher.setPattern(needle);
QCOMPARE(matcher.indexIn(haystack, from), indexIn);
QFETCH(int, indexIn);
QFETCH(int, cs);
QFETCH(int, indexIn);
QFETCH(int, cs);
- SubQStringMatcher matcher;
+ QStringMatcher matcher;
matcher.setPattern(needle);
matcher.setCaseSensitivity(static_cast<Qt::CaseSensitivity> (cs));
matcher.setPattern(needle);
matcher.setCaseSensitivity(static_cast<Qt::CaseSensitivity> (cs));