diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-04 19:05:53 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-04 19:05:53 (GMT) |
commit | 488c4fd1137c5702d2a52e9c00053561b69bcdb5 (patch) | |
tree | 940873cc78bc9505285da91f18d9c7068d6bd610 /src | |
parent | a7bf1cfb1a75c35e837c01f4a5b0697fc8961148 (diff) | |
parent | 0ee5619ac77285935317a2a068c90f8c999b3f0d (diff) | |
download | Qt-488c4fd1137c5702d2a52e9c00053561b69bcdb5.zip Qt-488c4fd1137c5702d2a52e9c00053561b69bcdb5.tar.gz Qt-488c4fd1137c5702d2a52e9c00053561b69bcdb5.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (21 commits)
Update japanese translations.
Ensure that the underline is only drawn when expected for an accel
Small improvement in the textedit demo
My changes for 4.7.1
QWorkspace: fix hardcoded min size overwriting the real min size
Doc: Fixing link titles and error color in search results
Doc: Implementing features to the search feature.
Setting the _NET_WM_STATE Atom only when its not already set
Fix focus appearance of tabwidget tabs with QGtkStyle
Incorrect selection background for unfocused widgets with GTK
Make the OpenSSL library search also hit /lib.
Update change log.
Doc: Implementing new doc search dialog.
Doc: fixing slim fit style - search box.
Doc: add style to new search results
Doc: fixing bugs in slim-fit style
Doc: Added lisence header to snippet
Fix a link that no longer exists in documentation.
Remove obsolete reference to qregexp.tex.
Reference to QStringList::find() is incorrect, should be QStringList::filter().
...
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 2 | ||||
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 21 | ||||
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 29 | ||||
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 10 | ||||
-rw-r--r-- | src/gui/widgets/qworkspace.cpp | 15 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols.cpp | 2 |
8 files changed, 54 insertions, 31 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 5cd7f0e..87af61a 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2767,7 +2767,7 @@ \value ElideNone Ellipsis should NOT appear in the text. Qt::ElideMiddle is normally the most appropriate choice for URLs (e.g., - "\l{http://qt.nokia.com/careers/movingto/brisbane/}{http://qt.nok...ovingto/brisbane/}"), + "\l{http://bugreports.qt.nokia.com/browse/QTWEBSITE-13}{http://bugreports.qt.../QTWEBSITE-13/}"), whereas Qt::ElideRight is appropriate for other strings (e.g., "\l{http://qt.nokia.com/doc/qq/qq09-mac-deployment.html}{Deploying Applications on Ma...}"). diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 36827d0..a8bf38f 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -74,10 +74,6 @@ int qFindString(const QChar *haystack, int haystackLen, int from, #define RXERR_INTERVAL QT_TRANSLATE_NOOP("QRegExp", "invalid interval") #define RXERR_CATEGORY QT_TRANSLATE_NOOP("QRegExp", "invalid category") -/* - WARNING! Be sure to read qregexp.tex before modifying this file. -*/ - /*! \class QRegExp \reentrant diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 5be885b..dba53af 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -565,7 +565,7 @@ const QString::Null QString::null = { }; and join a list of strings into a single string with an optional separator using QStringList::join(). You can obtain a list of strings from a string list that contain a particular substring or - that match a particular QRegExp using the QStringList::find() + that match a particular QRegExp using the QStringList::filter() function. : \section1 Querying String Data diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 8d80e10..9085e98 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1933,20 +1933,27 @@ void QWidgetPrivate::show_sys() if (flags & Qt::WindowStaysOnTopHint) { if (flags & Qt::WindowStaysOnBottomHint) qWarning() << "QWidget: Incompatible window flags: the window can't be on top and on bottom at the same time"; - netWmState.append(ATOM(_NET_WM_STATE_ABOVE)); - netWmState.append(ATOM(_NET_WM_STATE_STAYS_ON_TOP)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_ABOVE))) + netWmState.append(ATOM(_NET_WM_STATE_ABOVE)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_STAYS_ON_TOP))) + netWmState.append(ATOM(_NET_WM_STATE_STAYS_ON_TOP)); } else if (flags & Qt::WindowStaysOnBottomHint) { - netWmState.append(ATOM(_NET_WM_STATE_BELOW)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_BELOW))) + netWmState.append(ATOM(_NET_WM_STATE_BELOW)); } if (q->isFullScreen()) { - netWmState.append(ATOM(_NET_WM_STATE_FULLSCREEN)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_FULLSCREEN))) + netWmState.append(ATOM(_NET_WM_STATE_FULLSCREEN)); } if (q->isMaximized()) { - netWmState.append(ATOM(_NET_WM_STATE_MAXIMIZED_HORZ)); - netWmState.append(ATOM(_NET_WM_STATE_MAXIMIZED_VERT)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_MAXIMIZED_HORZ))) + netWmState.append(ATOM(_NET_WM_STATE_MAXIMIZED_HORZ)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_MAXIMIZED_VERT))) + netWmState.append(ATOM(_NET_WM_STATE_MAXIMIZED_VERT)); } if (data.window_modality != Qt::NonModal) { - netWmState.append(ATOM(_NET_WM_STATE_MODAL)); + if (!netWmState.contains(ATOM(_NET_WM_STATE_MODAL))) + netWmState.append(ATOM(_NET_WM_STATE_MODAL)); } if (!netWmState.isEmpty()) { diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index c5429dd..9cc64b3 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -225,9 +225,8 @@ QPalette QGtkStyle::standardPalette() const GtkStyle *style = d->gtkStyle(); GtkWidget *gtkButton = d->gtkWidget("GtkButton"); GtkWidget *gtkEntry = d->getTextColorWidget(); - - GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg; - QColor bg, base, text, fg, highlight, highlightText; + GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg, gdkaSbg, gdkaSfg; + QColor bg, base, text, fg, highlight, highlightText, inactiveHighlight, inactiveHighlightedTExt; gdkBg = style->bg[GTK_STATE_NORMAL]; gdkForeground = gtkButton->style->fg[GTK_STATE_NORMAL]; @@ -237,14 +236,23 @@ QPalette QGtkStyle::standardPalette() const gdkText = gtkEntry->style->text[GTK_STATE_NORMAL]; gdkSbg = gtkEntry->style->base[GTK_STATE_SELECTED]; gdkSfg = gtkEntry->style->text[GTK_STATE_SELECTED]; + + // The ACTIVE base color is really used for inactive windows + gdkaSbg = gtkEntry->style->base[GTK_STATE_ACTIVE]; + gdkaSfg = gtkEntry->style->text[GTK_STATE_ACTIVE]; + bg = QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); text = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); fg = QColor(gdkForeground.red>>8, gdkForeground.green>>8, gdkForeground.blue>>8); base = QColor(gdkBase.red>>8, gdkBase.green>>8, gdkBase.blue>>8); highlight = QColor(gdkSbg.red>>8, gdkSbg.green>>8, gdkSbg.blue>>8); highlightText = QColor(gdkSfg.red>>8, gdkSfg.green>>8, gdkSfg.blue>>8); + inactiveHighlight = QColor(gdkaSbg.red>>8, gdkaSbg.green>>8, gdkaSbg.blue>>8); + inactiveHighlightedTExt = QColor(gdkaSfg.red>>8, gdkaSfg.green>>8, gdkaSfg.blue>>8); palette.setColor(QPalette::HighlightedText, highlightText); + + palette.setColor(QPalette::Light, bg.lighter(125)); palette.setColor(QPalette::Shadow, bg.darker(130)); palette.setColor(QPalette::Dark, bg.darker(120)); @@ -279,6 +287,10 @@ QPalette QGtkStyle::standardPalette() const highlightText.setHsv(highlightText.hue(), 0, highlightText.value(), highlightText.alpha()); palette.setColor(QPalette::Disabled, QPalette::Highlight, highlight); palette.setColor(QPalette::Disabled, QPalette::HighlightedText, highlightText); + + palette.setColor(QPalette::Inactive, QPalette::HighlightedText, inactiveHighlightedTExt); + palette.setColor(QPalette::Inactive, QPalette::Highlight, inactiveHighlight); + style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow", d->gtk_window_get_type()); if (style) { @@ -791,10 +803,13 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, // ### this mess should move to subcontrolrect QRect frameRect = option->rect.adjusted(1, 1, -1, -2); - if (qobject_cast<const QTabBar*>(widget)) - frameRect.adjust(-1, 1, 1, 1); - - gtkPainter.paintFocus(NULL, "tab", frameRect, GTK_STATE_ACTIVE, style); + if (qobject_cast<const QTabBar*>(widget)) { + GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); + style = gtkPainter.getStyle(gtkNotebook); + gtkPainter.paintFocus(gtkNotebook, "tab", frameRect.adjusted(-1, 1, 1, 1), GTK_STATE_ACTIVE, style); + } else { + gtkPainter.paintFocus(NULL, "tab", frameRect, GTK_STATE_ACTIVE, style); + } } break; diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 671a888..fb31ae4 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -3336,6 +3336,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter if (needText) { QPalette pal = tb->palette; QPalette::ColorRole role = QPalette::NoRole; + if (!proxy()->styleHint(SH_UnderlineShortcut, tb, w)) + alignment |= Qt::TextHideMnemonic; if (down) cr.translate(shiftX, shiftY); if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5 @@ -3353,13 +3355,13 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter role = QPalette::HighlightedText; } } - drawItemText(p, cr, alignment, pal, - tb->state & State_Enabled, tb->text, role); + proxy()->drawItemText(p, cr, alignment, pal, + tb->state & State_Enabled, tb->text, role); if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5 && (tb->state & State_Sunken)) { // Draw a "drop shadow" in earlier versions. - drawItemText(p, cr.adjusted(0, 1, 0, 1), alignment, - tb->palette, tb->state & State_Enabled, tb->text); + proxy()->drawItemText(p, cr.adjusted(0, 1, 0, 1), alignment, + tb->palette, tb->state & State_Enabled, tb->text); } } } else { diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp index 7180c4d..3a9b30c 100644 --- a/src/gui/widgets/qworkspace.cpp +++ b/src/gui/widgets/qworkspace.cpp @@ -2551,7 +2551,6 @@ QWorkspaceChild::QWorkspaceChild(QWidget* window, QWorkspace *parent, Qt::Window this, SLOT(titleBarDoubleClicked())); } - setMinimumSize(128, 0); int fw = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, this); setContentsMargins(fw, fw, fw, fw); @@ -2702,11 +2701,15 @@ QSize QWorkspaceChild::sizeHint() const QSize QWorkspaceChild::minimumSizeHint() const { - if (!childWidget) - return QWidget::minimumSizeHint() + baseSize(); - QSize s = childWidget->minimumSize(); - if (s.isEmpty()) - s = childWidget->minimumSizeHint(); + QSize s; + if (!childWidget) { + s = QWidget::minimumSizeHint(); + } else { + s = childWidget->minimumSize(); + if (s.isEmpty()) + s = childWidget->minimumSizeHint(); + } + s = s.expandedTo(QSize(128, 0)); return s + baseSize(); } diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 6affa36..d717214 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -333,7 +333,7 @@ static QStringList findAllLibSsl() paths = QString::fromLatin1(qgetenv("LD_LIBRARY_PATH")) .split(QLatin1Char(':'), QString::SkipEmptyParts); # endif - paths << QLatin1String("/usr/lib") << QLatin1String("/usr/local/lib"); + paths << QLatin1String("/lib") << QLatin1String("/usr/lib") << QLatin1String("/usr/local/lib"); QStringList foundSsls; foreach (const QString &path, paths) { |