Skip to content

Commit

Permalink
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 int…
Browse files Browse the repository at this point in the history
…o master-integration

* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
  don't crash when destroying the shortcuts
  Disable activeqt on win32-g++ (it doesn't build).
  fix warning
  remove unused functions
  Make the DBus timeout configurable in QDBusAbstractInterface.
  Fix a typo in qt-conf docs.
  Revert "Fix build with the Clang compiler"
  Added missing no_include_pwd check
  Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'
  Fix build with the Clang compiler
  Change spacing of title in offline style.
  Add support for rawFonts loaded from data in FaceId
  examples: fix compilation with namespaced Qt.
  Russian translation update
  Update Japanese translations for Qt 4.8.
  directfb: Include directfbgl.h directly
  tests: fix QNetworkProxyFactory test
  don't detach until the list is going to be modified
  optimize QList::removeAll()
  • Loading branch information
Qt Continuous Integration System committed Aug 31, 2011
2 parents c57195d + e95de30 commit 1e48d40
Show file tree
Hide file tree
Showing 49 changed files with 1,685 additions and 859 deletions.
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -9017,6 +9017,10 @@ for file in .projects .projects.3; do
if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
continue
fi;;
*activeqt/*)
if [ "$PLATFORM" = "win32-g++" ] || [ "$XPLATFORM" = "win32-g++" ]; then
continue
fi;;
*examples/activeqt/*) continue ;;
*/qmake/qmake.pro) continue ;;
*tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
Expand Down
2 changes: 1 addition & 1 deletion demos/gradients/gradients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void GradientEditor::pointsUpdated()

for (int i=0; i<points.size(); ++i) {
qreal x = int(points.at(i).x());
if (i < points.size() - 1 && x == points.at(i+1).x())
if (i+1 < points.size() && x == points.at(i+1).x())
continue;
QColor color((0x00ff0000 & m_red_shade->colorAt(int(x))) >> 16,
(0x0000ff00 & m_green_shade->colorAt(int(x))) >> 8,
Expand Down
2 changes: 1 addition & 1 deletion doc/src/deployment/qt-conf.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

\o \c :/qt/etc/qt.conf using the resource system

\o on Mac OS X, in the Resource directory inside the appliction
\o on Mac OS X, in the Resource directory inside the application
bundle, for example \c assistant.app/Contents/Resources/qt.conf

\o in the directory containing the application executable, i.e.
Expand Down
12 changes: 9 additions & 3 deletions doc/src/template/style/offline.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@

body
{
margin-left: 0.5em;
margin-right: 0.5em;
margin: 0px;
font-family: sans-serif;
line-height: normal
}
Expand Down Expand Up @@ -238,7 +237,9 @@

.header .content
{
margin-bottom: 0.5em
margin-left: 5px;
margin-top: 5px;
margin-bottom: 0.5em;
}

.header .breadcrumb
Expand Down Expand Up @@ -413,6 +414,11 @@
.flowList dd a{
}

.mainContent
{
padding-left:5px;
}

.content .flowList p{
padding:0px;
}
Expand Down
2 changes: 2 additions & 0 deletions examples/webkit/simplewebplugin/csvfactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#include <QNetworkRequest>
#include <QWebPluginFactory>

QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkReply;
QT_END_NAMESPACE

//! [plugin factory]
class CSVFactory : public QWebPluginFactory
Expand Down
2 changes: 2 additions & 0 deletions examples/webkit/simplewebplugin/csvview.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
#include <QTableView>
#include <QWebPluginFactory>

QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkReply;
QT_END_NAMESPACE

//! [definition]
class CSVView : public QTableView
Expand Down
2 changes: 2 additions & 0 deletions examples/webkit/webftpclient/downloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
#include <QObject>
#include <QUrl>

QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkRequest;
class QNetworkReply;
class QWidget;
QT_END_NAMESPACE

class Downloader : public QObject
{
Expand Down
3 changes: 1 addition & 2 deletions examples/webkit/webftpclient/ftpreply.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
#include <QNetworkReply>
#include <QStringList>
#include <QUrlInfo>

class QFtp;
#include <QFtp>

//! [class definition]
class FtpReply : public QNetworkReply
Expand Down
1 change: 0 additions & 1 deletion examples/webkit/webftpclient/ftpview.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <QWebView>

class Downloader;
class QNetworkAccessManager;

class FtpView : public QWebView
{
Expand Down
2 changes: 2 additions & 0 deletions examples/webkit/webplugin/csvfactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#include <QNetworkRequest>
#include <QWebPluginFactory>

QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkReply;
QT_END_NAMESPACE
class QWebView;

class CSVFactory : public QWebPluginFactory
Expand Down
2 changes: 2 additions & 0 deletions examples/webkit/webplugin/csvview.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
#include <QTableView>
#include <QWebPluginFactory>

QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkReply;
QT_END_NAMESPACE
class QWebFrame;

//! [definition]
Expand Down
4 changes: 1 addition & 3 deletions examples/widgets/orientation/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
#include <QAbstractButton>

#include "ui_landscape.h"
#include "ui_portrait.h"

class QAbstractButton;

//! [0]
class MainWindow : public QWidget
{
Expand Down
2 changes: 1 addition & 1 deletion qmake/generators/makefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ MakefileGenerator::init()
(*it) = Option::fixPathToLocalOS((*it));
}

{ //get the output_dir into the pwd
if(!project->isActiveConfig("no_include_pwd")) { //get the output_dir into the pwd
if(Option::output_dir != qmake_getpwd())
project->values("INCLUDEPATH").append(".");
}
Expand Down
2 changes: 1 addition & 1 deletion qmake/generators/makefiledeps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
} else if(*(buffer+x) == '*') { //c style comment
for(++x; x < buffer_len; ++x) {
if(*(buffer+x) == '*') {
if(x < buffer_len-1 && *(buffer + (x+1)) == '/') {
if(x+1 < buffer_len && *(buffer + (x+1)) == '/') {
++x;
break;
}
Expand Down
6 changes: 3 additions & 3 deletions src/corelib/io/qdir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2008,17 +2008,17 @@ QString QDir::cleanPath(const QString &path)
const QChar *p = name.unicode();
for (int i = 0, last = -1, iwrite = 0; i < len; ++i) {
if (p[i] == QLatin1Char('/')) {
while (i < len-1 && p[i+1] == QLatin1Char('/')) {
while (i+1 < len && p[i+1] == QLatin1Char('/')) {
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) //allow unc paths
if (!i)
break;
#endif
i++;
}
bool eaten = false;
if (i < len - 1 && p[i+1] == QLatin1Char('.')) {
if (i+1 < len && p[i+1] == QLatin1Char('.')) {
int dotcount = 1;
if (i < len - 2 && p[i+2] == QLatin1Char('.'))
if (i+2 < len && p[i+2] == QLatin1Char('.'))
dotcount++;
if (i == len - dotcount - 1) {
if (dotcount == 1) {
Expand Down
31 changes: 19 additions & 12 deletions src/corelib/tools/qlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -769,25 +769,32 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::clear()
template <typename T>
Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t)
{
detachShared();
int index = indexOf(_t);
if (index == -1)
return 0;

const T t = _t;
int removedCount=0, i=0;
Node *n;
while (i < p.size())
if ((n = reinterpret_cast<Node *>(p.at(i)))->t() == t) {
node_destruct(n);
p.remove(i);
++removedCount;
} else {
++i;
}
detach();

Node *i = reinterpret_cast<Node *>(p.at(index));
Node *e = reinterpret_cast<Node *>(p.end());
Node *n = i;
node_destruct(i);
while (++i != e) {
if (i->t() == t)
node_destruct(i);
else
*n++ = *i;
}

int removedCount = e - n;
d->end -= removedCount;
return removedCount;
}

template <typename T>
Q_OUTOFLINE_TEMPLATE bool QList<T>::removeOne(const T &_t)
{
detachShared();
int index = indexOf(_t);
if (index != -1) {
removeAt(index);
Expand Down
4 changes: 2 additions & 2 deletions src/gui/painting/qpaintengine_raster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3552,7 +3552,7 @@ void QRasterPaintEngine::drawBitmap(const QPointF &pos, const QImage &image, QSp
spans[n].y = y;
spans[n].coverage = 255;
int len = 1;
while (src_x < w-1 && src[(src_x+1) >> 3] & (0x1 << ((src_x+1) & 7))) {
while (src_x+1 < w && src[(src_x+1) >> 3] & (0x1 << ((src_x+1) & 7))) {
++src_x;
++len;
}
Expand All @@ -3578,7 +3578,7 @@ void QRasterPaintEngine::drawBitmap(const QPointF &pos, const QImage &image, QSp
spans[n].y = y;
spans[n].coverage = 255;
int len = 1;
while (src_x < w-1 && src[(src_x+1) >> 3] & (0x80 >> ((src_x+1) & 7))) {
while (src_x+1 < w && src[(src_x+1) >> 3] & (0x80 >> ((src_x+1) & 7))) {
++src_x;
++len;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/painting/qpaintengine_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ static QPainterPath path_for_glyphs(const QVarLengthArray<glyph_t> &glyphs,
bool set = src[x >> 3] & (0x80 >> (x & 7));
if (set) {
QRect r(xp + x, yp - h, 1, 1);
while (x < glyph->width-1 && src[(x+1) >> 3] & (0x80 >> ((x+1) & 7))) {
while (x+1 < glyph->width && src[(x+1) >> 3] & (0x80 >> ((x+1) & 7))) {
++x;
r.setRight(r.right()+1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/painting/qtessellator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void QTessellatorPrivate::processIntersections()
QDEBUG() << " adding edge on left";
--min;
}
while (max < scanline.size - 1 && scanline.edges[max + 1]->positionAt(y) <= xmax) {
while (max + 1 < scanline.size && scanline.edges[max + 1]->positionAt(y) <= xmax) {
QDEBUG() << " adding edge on right";
++max;
}
Expand Down
3 changes: 2 additions & 1 deletion src/gui/text/qfontengine_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class Q_GUI_EXPORT QFontEngine : public QObject
struct FaceId {
FaceId() : index(0), encoding(0) {}
QByteArray filename;
QByteArray uuid;
int index;
int encoding;
};
Expand Down Expand Up @@ -295,7 +296,7 @@ inline bool operator ==(const QFontEngine::FaceId &f1, const QFontEngine::FaceId

inline uint qHash(const QFontEngine::FaceId &f)
{
return qHash((f.index << 16) + f.encoding) + qHash(f.filename);
return qHash((f.index << 16) + f.encoding) + qHash(f.filename + f.uuid);
}


Expand Down
2 changes: 2 additions & 0 deletions src/gui/text/qrawfont_ft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

#include "qrawfont_p.h"
#include "qfontengine_ft_p.h"
#include "quuid.h"

#if defined(Q_WS_X11) && !defined(QT_NO_FONTCONFIG)
# include "qfontengine_x11_p.h"
Expand Down Expand Up @@ -87,6 +88,7 @@ class QFontEngineFTRawFont
FaceId faceId;
faceId.filename = "";
faceId.index = 0;
faceId.uuid = QUuid::createUuid().toByteArray();

return init(faceId, true, Format_None, fontData);
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/qtabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const

if (tabIndex > 0 && tabIndex - 1 == d->currentIndex)
option->selectedPosition = QStyleOptionTab::PreviousIsSelected;
else if (tabIndex < totalTabs - 1 && tabIndex + 1 == d->currentIndex)
else if (tabIndex + 1 < totalTabs && tabIndex + 1 == d->currentIndex)
option->selectedPosition = QStyleOptionTab::NextIsSelected;
else
option->selectedPosition = QStyleOptionTab::NotAdjacent;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/platforms/directfb/qdirectfbglcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "qdirectfbglcontext.h"

#include <directfb/directfbgl.h>
#include <directfbgl.h>

#include <QDebug>

Expand Down
6 changes: 3 additions & 3 deletions src/qt3support/itemviews/q3listbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3531,9 +3531,9 @@ void Q3ListBox::refreshSlot()
int col = columnAt(x);
int row = rowAt(y);
int top = row;
while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x)
while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x)
col++;
while(top < (int)d->rowPos.size()-1 && d->rowPos[top+1] < y)
while(top+1 < (int)d->rowPos.size() && d->rowPos[top+1] < y)
top++;
Q3ListBoxItem * i = item(col * numRows() + row);

Expand Down Expand Up @@ -3684,7 +3684,7 @@ int Q3ListBox::columnAt(int x) const
return numColumns() - 1;

int col = 0;
while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x)
while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x)
col++;
return col;
}
Expand Down
2 changes: 1 addition & 1 deletion src/qt3support/sql/q3datatable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ bool Q3DataTable::eventFilter( QObject *o, QEvent *e )
return true;
}
if ( d->dat.mode() != QSql::None ) {
if ( (ke->key() == Qt::Key_Tab) && (c < numCols() - 1) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == QSql::Insert) )
if ( (ke->key() == Qt::Key_Tab) && (c+1 < numCols()) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == QSql::Insert) )
d->continuousEdit = true;
else if ( (ke->key() == Qt::Key_BackTab) && (c > 0) && (!isColumnReadOnly( c-1 ) || d->dat.mode() == QSql::Insert) )
d->continuousEdit = true;
Expand Down
2 changes: 1 addition & 1 deletion src/qt3support/text/q3richtext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static inline bool isBreakable(Q3TextString *string, int pos)
{
if (string->at(pos).nobreak)
return false;
return (pos < string->length()-1 && string->at(pos+1).softBreak);
return (pos+1 < string->length() && string->at(pos+1).softBreak);
}

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion src/scripttools/debugging/qscriptcompletiontask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression()
while ((pos > 0) && isIdentChar(contents.at(pos-1)))
--pos;
int pos2 = cursorPosition - 1;
while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1)))
while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1)))
++pos2;
QString ident = contents.mid(pos, pos2 - pos + 1);
position = pos;
Expand Down
2 changes: 1 addition & 1 deletion src/scripttools/debugging/qscriptdebuggercodeview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ bool QScriptDebuggerCodeView::event(QEvent *e)
return false;
}
int pos2 = linePosition - 1;
while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1)))
while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1)))
++pos2;
QString ident = contents.mid(pos, pos2 - pos + 1);

Expand Down
4 changes: 2 additions & 2 deletions src/sql/kernel/qsqlresult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ QString QSqlResultPrivate::namedToPositionalBinding()
QChar ch = sql.at(i);
if (ch == QLatin1Char(':') && !inQuote
&& (i == 0 || sql.at(i - 1) != QLatin1Char(':'))
&& (i < n - 1 && qIsAlnum(sql.at(i + 1)))) {
&& (i + 1 < n && qIsAlnum(sql.at(i + 1)))) {
int pos = i + 2;
while (pos < n && qIsAlnum(sql.at(pos)))
++pos;
Expand Down Expand Up @@ -618,7 +618,7 @@ bool QSqlResult::prepare(const QString& query)
QChar ch = query.at(i);
if (ch == QLatin1Char(':') && !inQuote
&& (i == 0 || query.at(i - 1) != QLatin1Char(':'))
&& (i < n - 1 && qIsAlnum(query.at(i + 1)))) {
&& (i + 1 < n && qIsAlnum(query.at(i + 1)))) {
int pos = i + 2;
while (pos < n && qIsAlnum(query.at(pos)))
++pos;
Expand Down
Loading

0 comments on commit 1e48d40

Please sign in to comment.