summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-07 15:17:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-07 15:17:04 (GMT)
commitbcbe4f07ff2e1246899e2988d778d7a824919b6c (patch)
tree9ee2944fb3dac118af8e05e754537b3c1ed7a396
parent381847a31786056519fef8ccf2853180f20f2b65 (diff)
parent7f4e85fbf14395adf16cf76eb342bd57c15e0f71 (diff)
downloadQt-bcbe4f07ff2e1246899e2988d778d7a824919b6c.zip
Qt-bcbe4f07ff2e1246899e2988d778d7a824919b6c.tar.gz
Qt-bcbe4f07ff2e1246899e2988d778d7a824919b6c.tar.bz2
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-water-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-water-team: Updating merge request 2512 Fix QTextEdit::selectAll crash from textChanged() Fix proxy reading from gconf so that it is only done once / session. Removes the reseting of the QMenu offset.
-rw-r--r--src/gui/text/qtextcursor.cpp3
-rw-r--r--src/gui/widgets/qmenu.cpp2
-rw-r--r--src/plugins/bearer/icd/proxyconf.cpp18
-rw-r--r--src/plugins/bearer/icd/proxyconf.h1
4 files changed, 20 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/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 4bea6de..538df35 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1795,10 +1795,12 @@ QSize QMenu::sizeHint() const
void QMenu::popup(const QPoint &p, QAction *atAction)
{
Q_D(QMenu);
+#ifndef Q_OS_SYMBIAN
if (d->scroll) { // reset scroll state from last popup
d->scroll->scrollOffset = 0;
d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
+#endif
d->tearoffHighlighted = 0;
d->motions = 0;
d->doChildEffects = true;
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