diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-06 23:00:13 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-06 23:00:13 (GMT) |
commit | dd6ca88e6f8d7c3c0f38e9343dc4db409e854de6 (patch) | |
tree | 132c399f7a57b615ca680cf2a3d28d94984a2655 /src | |
parent | 34bfad76d1afe4a0ee27496e740c8566387dc16c (diff) | |
parent | 6af078b2a13f4855a35d48376e58154ee2d57ec1 (diff) | |
download | Qt-dd6ca88e6f8d7c3c0f38e9343dc4db409e854de6.zip Qt-dd6ca88e6f8d7c3c0f38e9343dc4db409e854de6.tar.gz Qt-dd6ca88e6f8d7c3c0f38e9343dc4db409e854de6.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 3 | ||||
-rw-r--r-- | src/plugins/bearer/icd/proxyconf.cpp | 18 | ||||
-rw-r--r-- | src/plugins/bearer/icd/proxyconf.h | 1 |
3 files changed, 18 insertions, 4 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index 769ab2f..f73cc4b 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -363,6 +363,9 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor bool adjustX = true; QTextBlock blockIt = block(); + if (!blockIt.isValid()) + return false; + if (op >= QTextCursor::Left && op <= QTextCursor::WordRight && blockIt.textDirection() == Qt::RightToLeft) { if (op == QTextCursor::Left) diff --git a/src/plugins/bearer/icd/proxyconf.cpp b/src/plugins/bearer/icd/proxyconf.cpp index e5c8f4e..37501fb 100644 --- a/src/plugins/bearer/icd/proxyconf.cpp +++ b/src/plugins/bearer/icd/proxyconf.cpp @@ -142,16 +142,23 @@ QHash<QString,QVariant> GConfItemFast::getEntries() const -class NetworkProxyFactory : QNetworkProxyFactory { +class NetworkProxyFactory : QNetworkProxyFactory +{ + ProxyConf proxy_conf; + bool proxy_data_read; + public: - NetworkProxyFactory() { } + NetworkProxyFactory() : proxy_data_read(false) { } QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); }; QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) { - ProxyConf proxy_conf; + if (proxy_data_read == false) { + proxy_data_read = true; + proxy_conf.readProxyData(); + } QList<QNetworkProxy> result = proxy_conf.flush(query); if (result.isEmpty()) @@ -377,10 +384,13 @@ ProxyConf::~ProxyConf() delete d_ptr; } +void ProxyConf::readProxyData() +{ + d_ptr->readProxyData(); +} QList<QNetworkProxy> ProxyConf::flush(const QNetworkProxyQuery &query) { - d_ptr->readProxyData(); return d_ptr->flush(query); } diff --git a/src/plugins/bearer/icd/proxyconf.h b/src/plugins/bearer/icd/proxyconf.h index 884cc5c..eedbbf2 100644 --- a/src/plugins/bearer/icd/proxyconf.h +++ b/src/plugins/bearer/icd/proxyconf.h @@ -58,6 +58,7 @@ public: virtual ~ProxyConf(); QList<QNetworkProxy> flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db + void readProxyData(); /* Note that for each update() call there should be corresponding * clear() call because the ProxyConf class implements a reference |