Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6

This commit is contained in:
Liang Qi 2016-01-29 11:00:42 +00:00 committed by The Qt Project
commit 270cc073b7
4 changed files with 19 additions and 5 deletions

View File

@ -67,7 +67,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
# Make sure output from possible previous tests is gone
rm -f "$EXE" "${EXE}.exe"
set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS+=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes
else

View File

@ -193,16 +193,19 @@ void QFutureInterfaceBase::waitForResume()
int QFutureInterfaceBase::progressValue() const
{
const QMutexLocker lock(&d->m_mutex);
return d->m_progressValue;
}
int QFutureInterfaceBase::progressMinimum() const
{
const QMutexLocker lock(&d->m_mutex);
return d->m_progressMinimum;
}
int QFutureInterfaceBase::progressMaximum() const
{
const QMutexLocker lock(&d->m_mutex);
return d->m_progressMaximum;
}

View File

@ -146,18 +146,20 @@ public:
QAtomicInt m_refCountT;
};
// T: accessed from executing thread
// Q: accessed from the waiting/querying thread
RefCount refCount;
mutable QMutex m_mutex;
QWaitCondition waitCondition;
QList<QFutureCallOutInterface *> outputConnections;
int m_progressValue;
int m_progressMinimum;
int m_progressMaximum;
int m_progressValue; // TQ
int m_progressMinimum; // TQ
int m_progressMaximum; // TQ
QFutureInterfaceBase::State state;
QElapsedTimer progressTime;
QWaitCondition pausedWaitCondition;
QtPrivate::ResultStoreBase m_results;
bool manualProgress;
bool manualProgress; // only accessed from executing thread
int m_expectedResultCount;
QtPrivate::ExceptionStore m_exceptionStore;
QString m_progressText;

View File

@ -146,6 +146,7 @@ private slots:
void mysql_multiselect(); // For task 144331
void mysql_savepointtest_data() { generic_data("QMYSQL"); }
void mysql_savepointtest();
void mysql_connectWithInvalidAddress();
void accessOdbc_strings_data() { generic_data(); }
void accessOdbc_strings();
@ -2192,6 +2193,14 @@ void tst_QSqlDatabase::mysql_savepointtest()
QVERIFY_SQL(q, exec("savepoint foo"));
}
void tst_QSqlDatabase::mysql_connectWithInvalidAddress()
{
// Ensure that giving invalid connection parameters fails correctly
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("invalid.local");
QCOMPARE(db.open(), false);
}
void tst_QSqlDatabase::oci_tables()
{
QSKIP("Requires specific permissions to create a system table");