summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-02-08 10:57:34 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-02-08 10:57:34 (GMT)
commiteb7958c65b09569c2531d2c443a6d0fe0b507d97 (patch)
tree91544e4a4cf5c65b3acec7c219ebe63176a14994 /tools
parentef998bca70a799806c5754edfa49ea625881bc3e (diff)
parent44298c848ac254fe1942eb32eed7651dec5bf0e3 (diff)
downloadQt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.zip
Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.tar.gz
Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.tar.bz2
Merge branch 'master-upstream'
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/configure/configureapp.cpp28
-rw-r--r--tools/designer/src/lib/shared/layout.cpp22
-rw-r--r--tools/designer/src/lib/shared/qlayout_widget.cpp3
-rw-r--r--tools/linguist/linguist/formpreviewview.cpp2
-rw-r--r--tools/linguist/lupdate/qdeclarative.cpp2
-rw-r--r--tools/linguist/lupdate/qscript.cpp2
-rw-r--r--tools/linguist/lupdate/qscript.g2
-rw-r--r--tools/qvfb/qanimationwriter.cpp6
9 files changed, 51 insertions, 18 deletions
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 608d876..1245646 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -65,6 +65,7 @@ HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qstringlist.h \
$$QT_SOURCE_TREE/src/corelib/tools/qstringmatcher.h \
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \
+ $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror_p.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \
$$QT_SOURCE_TREE/tools/shared/symbian/epocroot_p.h \
@@ -111,6 +112,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qvsnprintf.cpp \
$$QT_SOURCE_TREE/src/corelib/kernel/qvariant.cpp \
+ $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qurl.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qline.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qsize.cpp \
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 0c172e8..6b87c8e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -437,6 +437,7 @@ void Configure::parseCmdLine()
{
int argCount = configCmdLine.size();
int i = 0;
+ const QStringList imageFormats = QStringList() << "gif" << "png" << "mng" << "jpeg" << "tiff";
#if !defined(EVAL)
if (argCount < 1) // skip rest if no arguments
@@ -829,6 +830,17 @@ void Configure::parseCmdLine()
dictionary[ "SQL_IBASE" ] = "plugin";
else if (configCmdLine.at(i) == "-no-sql-ibase")
dictionary[ "SQL_IBASE" ] = "no";
+
+ // Image formats --------------------------------------------
+ else if (configCmdLine.at(i).startsWith("-qt-imageformat-") &&
+ imageFormats.contains(configCmdLine.at(i).section('-', 3)))
+ dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "yes";
+ else if (configCmdLine.at(i).startsWith("-plugin-imageformat-") &&
+ imageFormats.contains(configCmdLine.at(i).section('-', 3)))
+ dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "plugin";
+ else if (configCmdLine.at(i).startsWith("-no-imageformat-") &&
+ imageFormats.contains(configCmdLine.at(i).section('-', 3)))
+ dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no";
#endif
// IDE project generation -----------------------------------
else if (configCmdLine.at(i) == "-no-dsp")
@@ -1029,6 +1041,8 @@ void Configure::parseCmdLine()
QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]);
dictionary[ "QT_INSTALL_IMPORTS" ] =
QString("\\resource\\qt%1\\imports").arg(dictionary[ "QT_LIBINFIX" ]);
+ dictionary[ "QT_INSTALL_TRANSLATIONS" ] =
+ QString("\\resource\\qt%1\\translations").arg(dictionary[ "QT_LIBINFIX" ]);
}
} else if (configCmdLine.at(i) == "-D") {
++i;
@@ -3449,8 +3463,12 @@ void Configure::displayConfig()
webkit = "yes (debug)";
cout << "WebKit support.............." << webkit << endl;
}
- cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl;
- cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
+ {
+ QString declarative = dictionary[ "DECLARATIVE" ];
+ cout << "Declarative support........." << declarative << endl;
+ if (declarative == "yes")
+ cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
+ }
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl;
cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl;
@@ -3581,7 +3599,11 @@ void Configure::generateHeaders()
QStringList env;
env += QString("QTDIR=" + sourcePath);
env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH"));
- Environment::execute(args, env, QStringList());
+ int retc = Environment::execute(args, env, QStringList());
+ if (retc) {
+ cout << "syncqt failed, return code " << retc << endl << endl;
+ dictionary["DONE"] = "error";
+ }
}
}
diff --git a/tools/designer/src/lib/shared/layout.cpp b/tools/designer/src/lib/shared/layout.cpp
index c9ffe71..9fe438b 100644
--- a/tools/designer/src/lib/shared/layout.cpp
+++ b/tools/designer/src/lib/shared/layout.cpp
@@ -996,13 +996,23 @@ bool Grid::shrinkFormLayoutSpans()
for (WidgetSet::const_iterator it = widgets.constBegin(); it != cend ; ++it) {
QWidget *w = *it;
int row, col, rowspan, colspan;
- locateWidget(w, row, col, rowspan, colspan);
+ if (!locateWidget(w, row, col, rowspan, colspan))
+ qDebug("ooops, widget '%s' does not fit in layout", w->objectName().toUtf8().constData());
const int maxColSpan = col == 0 ? 2 : 1;
const int newColSpan = qMin(colspan, maxColSpan);
const int newRowSpan = qMin(rowspan, maxRowSpan);
if (newColSpan != colspan || newRowSpan != rowspan) {
- setCells(QRect(col, row, colspan, rowspan), 0);
- setCells(QRect(col, row, newColSpan, newRowSpan), w);
+ // in case like this:
+ // W1 W1
+ // W1 W2
+ // do:
+ // W1 0
+ // 0 W2
+ for (int i = row; i < row + rowspan - 1; i++)
+ for (int j = col; j < col + colspan - 1; j++)
+ if (i > row + newColSpan - 1 || j > col + newRowSpan - 1)
+ if (cell(i, j) == w)
+ setCell(i, j, 0);
shrunk = true;
}
}
@@ -1177,11 +1187,7 @@ void GridLayout<GridLikeLayout, LayoutType, GridMode>::doLayout()
if (const Spacer *spacer = qobject_cast<const Spacer*>(w))
alignment = spacer->alignment();
- if (rs * cs == 1) {
- addWidgetToGrid(layout, w, r, c, 1, 1, alignment);
- } else {
- addWidgetToGrid(layout, w, r, c, rs, cs, alignment);
- }
+ addWidgetToGrid(layout, w, r, c, rs, cs, alignment);
w->show();
} else {
diff --git a/tools/designer/src/lib/shared/qlayout_widget.cpp b/tools/designer/src/lib/shared/qlayout_widget.cpp
index e9cf51a..66e7a79 100644
--- a/tools/designer/src/lib/shared/qlayout_widget.cpp
+++ b/tools/designer/src/lib/shared/qlayout_widget.cpp
@@ -1189,8 +1189,7 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
} else {
for (int c = 0; c < FormLayoutColumns; c++) {
const QFormLayout::ItemRole role = c == 0 ? QFormLayout::LabelRole : QFormLayout::FieldRole;
- if (widgets[c]) {
- Q_ASSERT(BoxLayoutHelper::findItemOfWidget(items, widgets[c]));
+ if (widgets[c] && BoxLayoutHelper::findItemOfWidget(items, widgets[c])) {
formLayout->setWidget(r, role, widgets[c]);
} else {
formLayout->setItem(r, role, createFormSpacer());
diff --git a/tools/linguist/linguist/formpreviewview.cpp b/tools/linguist/linguist/formpreviewview.cpp
index d46cf76..a2a6002 100644
--- a/tools/linguist/linguist/formpreviewview.cpp
+++ b/tools/linguist/linguist/formpreviewview.cpp
@@ -463,6 +463,8 @@ FormPreviewView::FormPreviewView(QWidget *parent, MultiDataModel *dataModel)
m_mdiArea = new QMdiArea(this);
m_mdiArea->addSubWindow(m_mdiSubWindow);
setCentralWidget(m_mdiArea);
+ m_mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ m_mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
}
void FormPreviewView::setSourceContext(int model, MessageItem *messageItem)
diff --git a/tools/linguist/lupdate/qdeclarative.cpp b/tools/linguist/lupdate/qdeclarative.cpp
index b85b1a7..1c1e9ad 100644
--- a/tools/linguist/lupdate/qdeclarative.cpp
+++ b/tools/linguist/lupdate/qdeclarative.cpp
@@ -225,7 +225,7 @@ protected:
const QString id = literal->value->asString();
bool plural = node->arguments->next;
- TranslatorMessage msg(QString(), QString(),
+ TranslatorMessage msg(QString(), sourcetext,
QString(), QString(), m_fileName,
node->firstSourceLocation().startLine, QStringList(),
TranslatorMessage::Unfinished, plural);
diff --git a/tools/linguist/lupdate/qscript.cpp b/tools/linguist/lupdate/qscript.cpp
index 1ff7e1c..e53c9dc 100644
--- a/tools/linguist/lupdate/qscript.cpp
+++ b/tools/linguist/lupdate/qscript.cpp
@@ -1530,7 +1530,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalEscapeSequence;
- errmsg = LU::tr("Illegal escape squence");
+ errmsg = LU::tr("Illegal escape sequence");
}
} else if (current == 'x')
state = InHexEscape;
diff --git a/tools/linguist/lupdate/qscript.g b/tools/linguist/lupdate/qscript.g
index 66ec2c7..b8b7b5f 100644
--- a/tools/linguist/lupdate/qscript.g
+++ b/tools/linguist/lupdate/qscript.g
@@ -861,7 +861,7 @@ int QScript::Lexer::lex()
} else {
setDone(Bad);
err = IllegalEscapeSequence;
- errmsg = LU::tr("Illegal escape squence");
+ errmsg = LU::tr("Illegal escape sequence");
}
} else if (current == 'x')
state = InHexEscape;
diff --git a/tools/qvfb/qanimationwriter.cpp b/tools/qvfb/qanimationwriter.cpp
index 74a7b5f..c91a916 100644
--- a/tools/qvfb/qanimationwriter.cpp
+++ b/tools/qvfb/qanimationwriter.cpp
@@ -112,9 +112,11 @@ public:
void writePNG(const QImage& image)
{
-#ifndef QT_LINUXBASE
+#if !defined(QT_LINUXBASE) && \
+ (PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR <= 4))
// LSB disallows accessing the info_ptr directly. LSB's png_set_IHDR sets
- // the channels anyways, so just comment it out for LSB usage
+ // the channels anyways, so just comment it out for LSB usage.
+ // In libpng >= 1.5, the png_info struct is no longer exported.
info_ptr->channels = 4;
#endif
png_set_sig_bytes(png_ptr, 8); // Pretend we already wrote the sig