summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-11-18 00:00:11 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-11-18 00:00:11 (GMT)
commit5ed8a8f0a6ff2dbb4d0836d58d3916a04cca8d4b (patch)
treefb22b200469d6625d2a080039b70a43f5ab8253b /src
parentbfdf62fe02987c5db881527b53e3ba758d6b272e (diff)
parent2829f215ffa2aff64bd5aa60f223653b7c38c2e9 (diff)
downloadQt-5ed8a8f0a6ff2dbb4d0836d58d3916a04cca8d4b.zip
Qt-5ed8a8f0a6ff2dbb4d0836d58d3916a04cca8d4b.tar.gz
Qt-5ed8a8f0a6ff2dbb4d0836d58d3916a04cca8d4b.tar.bz2
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlocale.cpp1
-rw-r--r--src/gui/kernel/qwidget_win.cpp23
2 files changed, 13 insertions, 11 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 6b1de5e..2fb3616 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -7308,6 +7308,7 @@ Q_CORE_EXPORT char *qdtoa( double d, int mode, int ndigits, int *decpt, int *sig
Q_CORE_EXPORT double qstrtod(const char *s00, const char **se, bool *ok)
{
+ errno = 0;
double ret = strtod((char*)s00, (char**)se);
if (ok) {
if((ret == 0.0l && errno == ERANGE)
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 39ed750..c358b9b 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -329,18 +329,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (topLevel) {
if ((type == Qt::Window || dialog || tool)) {
if (!(flags & Qt::FramelessWindowHint)) {
- if (!(flags & Qt::MSWindowsFixedSizeDialogHint)) {
+ style |= WS_POPUP;
+ if (!(flags & Qt::MSWindowsFixedSizeDialogHint))
style |= WS_THICKFRAME;
- if(!(flags &
- ( Qt::WindowSystemMenuHint
- | Qt::WindowTitleHint
- | Qt::WindowMinMaxButtonsHint
- | Qt::WindowCloseButtonHint
- | Qt::WindowContextHelpButtonHint)))
- style |= WS_POPUP;
- } else {
- style |= WS_POPUP | WS_DLGFRAME;
- }
+ else
+ style |= WS_DLGFRAME;
}
if (flags & Qt::WindowTitleHint)
style |= WS_CAPTION;
@@ -424,6 +417,14 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (!q->testAttribute(Qt::WA_Resized)) {
w = sw/2;
h = 4*sh/10;
+ if (extra) {
+ int dx = rect.right - rect.left;
+ int dy = rect.bottom - rect.top;
+ w = qMin(w, extra->maxw + dx);
+ h = qMin(h, extra->maxh + dy);
+ w = qMax(w, extra->minw + dx);
+ h = qMax(h, extra->minh + dy);
+ }
}
if (!wasMoved) {
x = sw/2 - w/2;