summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-06 15:51:49 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-06 15:51:49 (GMT)
commit69bc7ba41375e3f00b2111bda8d2743654960f71 (patch)
tree0c1e9b573ba6eaee4ec8686937ad12307f40dc51 /tools
parentd63accf173ed58c7746ecd1e3a40ecac263f186f (diff)
parent522660346023c025d14bfa029f70c88d18eb609d (diff)
downloadQt-69bc7ba41375e3f00b2111bda8d2743654960f71.zip
Qt-69bc7ba41375e3f00b2111bda8d2743654960f71.tar.gz
Qt-69bc7ba41375e3f00b2111bda8d2743654960f71.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: uic3/uic: Ignore buttonGroupId property when there is no parent QButtonGroup Changelog: Added Designer/uic entries for 4.6.1 Designer: Enable seconds editing for Q[Date]TimeEdit's properties. Designer: Selection handles disappear when using style sheet on form. do not accumulate messages
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/components/formeditor/widgetselection.cpp4
-rw-r--r--tools/linguist/lrelease/main.cpp5
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.cpp3
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp21
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h3
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.cpp45
6 files changed, 58 insertions, 23 deletions
diff --git a/tools/designer/src/components/formeditor/widgetselection.cpp b/tools/designer/src/components/formeditor/widgetselection.cpp
index 484e3a9..35f1509 100644
--- a/tools/designer/src/components/formeditor/widgetselection.cpp
+++ b/tools/designer/src/components/formeditor/widgetselection.cpp
@@ -86,7 +86,7 @@ static inline Layout *managedLayoutOf(const QDesignerFormEditorInterface *core,
// ----------- WidgetHandle
WidgetHandle::WidgetHandle(FormWindow *parent, WidgetHandle::Type t, WidgetSelection *s) :
- InvisibleWidget(parent->mainContainer()),
+ InvisibleWidget(parent->formContainer()),
m_widget(0),
m_type(t),
m_formWindow( parent),
@@ -638,7 +638,7 @@ void WidgetSelection::updateGeometry()
return;
QPoint p = m_widget->parentWidget()->mapToGlobal(m_widget->pos());
- p = m_formWindow->mapFromGlobal(p);
+ p = m_formWindow->formContainer()->mapFromGlobal(p);
const QRect r(p, m_widget->size());
const int w = 6;
diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp
index b8e8eb2..2ab4a5e 100644
--- a/tools/linguist/lrelease/main.cpp
+++ b/tools/linguist/lrelease/main.cpp
@@ -111,6 +111,7 @@ static bool loadTsFile(Translator &tor, const QString &tsFileName, bool /* verbo
if (!cd.errors().isEmpty())
printOut(cd.error());
}
+ cd.clearErrors();
return ok;
}
@@ -141,11 +142,11 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName,
if (!ok) {
qWarning("lrelease error: cannot save '%s': %s\n",
qPrintable(qmFileName), qPrintable(cd.error()));
- return false;
} else if (!cd.errors().isEmpty()) {
printOut(cd.error());
}
- return true;
+ cd.clearErrors();
+ return ok;
}
static bool releaseTsFile(const QString& tsFileName,
diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.cpp b/tools/shared/qtpropertybrowser/qteditorfactory.cpp
index 17c5be8..ed74439 100644
--- a/tools/shared/qtpropertybrowser/qteditorfactory.cpp
+++ b/tools/shared/qtpropertybrowser/qteditorfactory.cpp
@@ -1158,6 +1158,7 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope
QWidget *parent)
{
QDateEdit *editor = d_ptr->createEditor(property, parent);
+ editor->setDisplayFormat(QtPropertyBrowserUtils::dateFormat());
editor->setCalendarPopup(true);
editor->setDateRange(manager->minimum(property), manager->maximum(property));
editor->setDate(manager->value(property));
@@ -1272,6 +1273,7 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope
QWidget *parent)
{
QTimeEdit *editor = d_ptr->createEditor(property, parent);
+ editor->setDisplayFormat(QtPropertyBrowserUtils::timeFormat());
editor->setTime(manager->value(property));
connect(editor, SIGNAL(timeChanged(QTime)),
@@ -1385,6 +1387,7 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager,
QtProperty *property, QWidget *parent)
{
QDateTimeEdit *editor = d_ptr->createEditor(property, parent);
+ editor->setDisplayFormat(QtPropertyBrowserUtils::dateTimeFormat());
editor->setDateTime(manager->value(property));
connect(editor, SIGNAL(dateTimeChanged(QDateTime)),
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
index 9e0421f..63e4a63 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
@@ -47,6 +47,7 @@
#include <QtGui/QCheckBox>
#include <QtGui/QLineEdit>
#include <QtGui/QMenu>
+#include <QtCore/QLocale>
QT_BEGIN_NAMESPACE
@@ -208,6 +209,26 @@ QString QtPropertyBrowserUtils::fontValueText(const QFont &f)
.arg(f.pointSize());
}
+QString QtPropertyBrowserUtils::dateFormat()
+{
+ QLocale loc;
+ return loc.dateFormat(QLocale::ShortFormat);
+}
+
+QString QtPropertyBrowserUtils::timeFormat()
+{
+ QLocale loc;
+ // ShortFormat is missing seconds on UNIX.
+ return loc.timeFormat(QLocale::LongFormat);
+}
+
+QString QtPropertyBrowserUtils::dateTimeFormat()
+{
+ QString format = dateFormat();
+ format += QLatin1Char(' ');
+ format += timeFormat();
+ return format;
+}
QtBoolEdit::QtBoolEdit(QWidget *parent) :
QWidget(parent),
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
index 09d29ae..358f9f4 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
@@ -94,6 +94,9 @@ public:
static QPixmap fontValuePixmap(const QFont &f);
static QIcon fontValueIcon(const QFont &f);
static QString fontValueText(const QFont &f);
+ static QString dateFormat();
+ static QString timeFormat();
+ static QString dateTimeFormat();
};
class QtBoolEdit : public QWidget {
diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
index a26dcda..fbad0ca 100644
--- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
@@ -1553,6 +1553,7 @@ class QtDatePropertyManagerPrivate
QtDatePropertyManager *q_ptr;
Q_DECLARE_PUBLIC(QtDatePropertyManager)
public:
+ explicit QtDatePropertyManagerPrivate(QtDatePropertyManager *q);
struct Data
{
@@ -1573,6 +1574,12 @@ public:
QMap<const QtProperty *, Data> m_values;
};
+QtDatePropertyManagerPrivate::QtDatePropertyManagerPrivate(QtDatePropertyManager *q) :
+ q_ptr(q),
+ m_format(QtPropertyBrowserUtils::dateFormat())
+{
+}
+
/*!
\class QtDatePropertyManager
\internal
@@ -1622,12 +1629,8 @@ public:
Creates a manager with the given \a parent.
*/
QtDatePropertyManager::QtDatePropertyManager(QObject *parent)
- : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate)
+ : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate(this))
{
- d_ptr->q_ptr = this;
-
- QLocale loc;
- d_ptr->m_format = loc.dateFormat(QLocale::ShortFormat);
}
/*!
@@ -1786,13 +1789,20 @@ class QtTimePropertyManagerPrivate
QtTimePropertyManager *q_ptr;
Q_DECLARE_PUBLIC(QtTimePropertyManager)
public:
+ explicit QtTimePropertyManagerPrivate(QtTimePropertyManager *q);
- QString m_format;
+ const QString m_format;
typedef QMap<const QtProperty *, QTime> PropertyValueMap;
PropertyValueMap m_values;
};
+QtTimePropertyManagerPrivate::QtTimePropertyManagerPrivate(QtTimePropertyManager *q) :
+ q_ptr(q),
+ m_format(QtPropertyBrowserUtils::timeFormat())
+{
+}
+
/*!
\class QtTimePropertyManager
\internal
@@ -1825,12 +1835,8 @@ public:
Creates a manager with the given \a parent.
*/
QtTimePropertyManager::QtTimePropertyManager(QObject *parent)
- : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate)
+ : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate(this))
{
- d_ptr->q_ptr = this;
-
- QLocale loc;
- d_ptr->m_format = loc.timeFormat(QLocale::ShortFormat);
}
/*!
@@ -1903,13 +1909,20 @@ class QtDateTimePropertyManagerPrivate
QtDateTimePropertyManager *q_ptr;
Q_DECLARE_PUBLIC(QtDateTimePropertyManager)
public:
+ explicit QtDateTimePropertyManagerPrivate(QtDateTimePropertyManager *q);
- QString m_format;
+ const QString m_format;
typedef QMap<const QtProperty *, QDateTime> PropertyValueMap;
PropertyValueMap m_values;
};
+QtDateTimePropertyManagerPrivate::QtDateTimePropertyManagerPrivate(QtDateTimePropertyManager *q) :
+ q_ptr(q),
+ m_format(QtPropertyBrowserUtils::dateTimeFormat())
+{
+}
+
/*! \class QtDateTimePropertyManager
\internal
\inmodule QtDesigner
@@ -1938,14 +1951,8 @@ public:
Creates a manager with the given \a parent.
*/
QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent)
- : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate)
+ : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate(this))
{
- d_ptr->q_ptr = this;
-
- QLocale loc;
- d_ptr->m_format = loc.dateFormat(QLocale::ShortFormat);
- d_ptr->m_format += QLatin1Char(' ');
- d_ptr->m_format += loc.timeFormat(QLocale::ShortFormat);
}
/*!