summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/fulltextsearch/qclucene-config_p.h14
-rw-r--r--tools/assistant/lib/fulltextsearch/qclucene_global_p.h2
-rw-r--r--tools/configure/environment.cpp2
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp61
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.h4
-rw-r--r--tools/designer/src/designer/mainwindow.cpp20
-rw-r--r--tools/designer/src/designer/qdesigner_actions.cpp19
-rw-r--r--tools/designer/src/designer/qdesigner_actions.h4
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.cpp1
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp22
-rw-r--r--tools/qtestlib/wince/cetest/cetest.pro3
-rw-r--r--tools/qtestlib/wince/cetest/qmake_include.pri2
-rw-r--r--tools/tools.pro3
13 files changed, 71 insertions, 86 deletions
diff --git a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
index 0c70718..387d64d 100644
--- a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
+++ b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
@@ -314,14 +314,12 @@ configure.
#define _CL_HAVE_SYS_TYPES_H 1
#endif
-// Do not use the tchar.h that ships with mingw, this causes the qt build to
-// fail (211547, 211401, etc...), reuse the replacement as with any other compiler
-// #if defined(__MINGW32__)
-// /* Define to 1 if you have the <tchar.h> header file. */
-// # ifndef _CL_HAVE_TCHAR_H
-// # define _CL_HAVE_TCHAR_H 1
-// # endif
-// #endif
+#if defined(__MINGW32__)
+ /* Define to 1 if you have the <tchar.h> header file. */
+ # ifndef _CL_HAVE_TCHAR_H
+ # define _CL_HAVE_TCHAR_H 1
+ # endif
+#endif
#if defined(__MINGW32__) || defined(__SUNPRO_CC) || defined(__SUNPRO_C)
/* Define to 1 if you have the `tell' function. */
diff --git a/tools/assistant/lib/fulltextsearch/qclucene_global_p.h b/tools/assistant/lib/fulltextsearch/qclucene_global_p.h
index f4b744d..206725b 100644
--- a/tools/assistant/lib/fulltextsearch/qclucene_global_p.h
+++ b/tools/assistant/lib/fulltextsearch/qclucene_global_p.h
@@ -36,7 +36,7 @@
#include <QtCore/QChar>
#include <QtCore/QString>
-#if !defined(_MSC_VER) && defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T)
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T)
# if !defined(TCHAR)
# define TCHAR wchar_t
# endif
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 74bebb2..60b8dcc 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -73,7 +73,7 @@ struct CompilerInfo{
} compiler_info[] = {
// The compilers here are sorted in a reversed-preferred order
{CC_BORLAND, "Borland C++", 0, "bcc32.exe"},
- {CC_MINGW, "MinGW (Minimalist GNU for Windows)", 0, "mingw32-gcc.exe"},
+ {CC_MINGW, "MinGW (Minimalist GNU for Windows)", 0, "g++.exe"},
{CC_INTEL, "Intel(R) C++ Compiler for 32-bit applications", 0, "icl.exe"}, // xilink.exe, xilink5.exe, xilink6.exe, xilib.exe
{CC_MSVC6, "Microsoft (R) 32-bit C/C++ Optimizing Compiler (6.x)", "Software\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual C++\\ProductDir", "cl.exe"}, // link.exe, lib.exe
{CC_NET2002, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2002 (7.0)", "Software\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir", "cl.exe"}, // link.exe, lib.exe
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
index b659179..1d78695 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -53,7 +53,6 @@
#include "qtresourcemodel_p.h"
#include "qmdiarea_container.h"
#include "qwizard_container.h"
-#include "itemview_propertysheet.h"
#include "layout_propertysheet.h"
#include <ui4_p.h>
@@ -106,8 +105,6 @@
#include <QtGui/QMenuBar>
#include <QtGui/QFileDialog>
#include <QtGui/QHeaderView>
-#include <QtGui/QTreeView>
-#include <QtGui/QTableView>
#include <QtGui/QWizardPage>
#include <private/qlayoutengine_p.h>
@@ -1275,10 +1272,6 @@ DomWidget *QDesignerResource::createDom(QWidget *widget, DomWidget *ui_parentWid
w = saveWidget(dockWidget, ui_parentWidget);
else if (QDesignerContainerExtension *container = qt_extension<QDesignerContainerExtension*>(core()->extensionManager(), widget))
w = saveWidget(widget, container, ui_parentWidget);
- else if (QTreeView *treeView = qobject_cast<QTreeView*>(widget))
- w = saveWidget(treeView, ui_parentWidget);
- else if (QTableView *tableView = qobject_cast<QTableView*>(widget))
- w = saveWidget(tableView, ui_parentWidget);
else if (QWizardPage *wizardPage = qobject_cast<QWizardPage*>(widget))
w = saveWidget(wizardPage, ui_parentWidget);
else
@@ -1553,60 +1546,6 @@ DomWidget *QDesignerResource::saveWidget(QDesignerDockWidget *dockWidget, DomWid
return ui_widget;
}
-DomWidget *QDesignerResource::saveWidget(QTreeView *treeView, DomWidget *ui_parentWidget)
-{
- DomWidget *ui_widget = QAbstractFormBuilder::createDom(treeView, ui_parentWidget, true);
-
- QDesignerPropertySheetExtension *sheet
- = qt_extension<QDesignerPropertySheetExtension*>(core()->extensionManager(), treeView);
- ItemViewPropertySheet *itemViewSheet = static_cast<ItemViewPropertySheet*>(sheet);
-
- if (itemViewSheet) {
- QHash<QString,QString> nameMap = itemViewSheet->propertyNameMap();
- foreach (const QString &fakeName, nameMap.keys()) {
- int index = itemViewSheet->indexOf(fakeName);
- if (sheet->isChanged(index)) {
- DomProperty *domAttr = createProperty(treeView->header(), nameMap.value(fakeName),
- itemViewSheet->property(index));
- domAttr->setAttributeName(fakeName);
- ui_widget->setElementAttribute(ui_widget->elementAttribute() << domAttr);
- }
- }
- }
-
- return ui_widget;
-}
-
-DomWidget *QDesignerResource::saveWidget(QTableView *tableView, DomWidget *ui_parentWidget)
-{
- DomWidget *ui_widget = QAbstractFormBuilder::createDom(tableView, ui_parentWidget, true);
-
- QDesignerPropertySheetExtension *sheet
- = qt_extension<QDesignerPropertySheetExtension*>(core()->extensionManager(), tableView);
- ItemViewPropertySheet *itemViewSheet = static_cast<ItemViewPropertySheet*>(sheet);
-
- if (itemViewSheet) {
- QHash<QString,QString> nameMap = itemViewSheet->propertyNameMap();
- foreach (const QString &fakeName, nameMap.keys()) {
- int index = itemViewSheet->indexOf(fakeName);
- if (sheet->isChanged(index)) {
- DomProperty *domAttr;
- if (fakeName.startsWith(QLatin1String("horizontal"))) {
- domAttr = createProperty(tableView->horizontalHeader(), nameMap.value(fakeName),
- itemViewSheet->property(index));
- } else {
- domAttr = createProperty(tableView->verticalHeader(), nameMap.value(fakeName),
- itemViewSheet->property(index));
- }
- domAttr->setAttributeName(fakeName);
- ui_widget->setElementAttribute(ui_widget->elementAttribute() << domAttr);
- }
- }
- }
-
- return ui_widget;
-}
-
static void saveStringProperty(DomProperty *property, const PropertySheetStringValue &value)
{
DomString *str = new DomString();
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.h b/tools/designer/src/components/formeditor/qdesigner_resource.h
index 33b5b88..47dd263 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.h
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.h
@@ -64,8 +64,6 @@ class QTabWidget;
class QStackedWidget;
class QToolBox;
class QToolBar;
-class QTreeView;
-class QTableView;
class QDesignerDockWidget;
class QLayoutWidget;
class QWizardPage;
@@ -138,8 +136,6 @@ protected:
DomWidget *saveWidget(QWidget *widget, QDesignerContainerExtension *container, DomWidget *ui_parentWidget);
DomWidget *saveWidget(QToolBar *toolBar, DomWidget *ui_parentWidget);
DomWidget *saveWidget(QDesignerDockWidget *dockWidget, DomWidget *ui_parentWidget);
- DomWidget *saveWidget(QTreeView *treeView, DomWidget *ui_parentWidget);
- DomWidget *saveWidget(QTableView *tableView, DomWidget *ui_parentWidget);
DomWidget *saveWidget(QWizardPage *wizardPage, DomWidget *ui_parentWidget);
virtual DomCustomWidgets *saveCustomWidgets();
diff --git a/tools/designer/src/designer/mainwindow.cpp b/tools/designer/src/designer/mainwindow.cpp
index c27e2b4..86bc47e 100644
--- a/tools/designer/src/designer/mainwindow.cpp
+++ b/tools/designer/src/designer/mainwindow.cpp
@@ -75,7 +75,7 @@ static void addActionsToToolBar(const ActionList &actions, QToolBar *t)
const ActionList::const_iterator cend = actions.constEnd();
for (ActionList::const_iterator it = actions.constBegin(); it != cend; ++it) {
QAction *action = *it;
- if (!action->icon().isNull())
+ if (action->property(QDesignerActions::defaultToolbarPropertyName).toBool())
t->addAction(action);
}
}
@@ -113,6 +113,8 @@ void MainWindowBase::closeEvent(QCloseEvent *e)
QList<QToolBar *> MainWindowBase::createToolBars(const QDesignerActions *actions, bool singleToolBar)
{
+ // Note that whenever you want to add a new tool bar here, you also have to update the default
+ // action groups added to the toolbar manager in the mainwindow constructor
QList<QToolBar *> rc;
if (singleToolBar) {
//: Not currently used (main tool bar)
@@ -252,6 +254,22 @@ ToolBarManager::ToolBarManager(QMainWindow *configureableMainWindow,
m_manager->addAction(action, dockTitle);
}
+ QString category(tr("File"));
+ foreach(QAction *action, actions->fileActions()->actions())
+ m_manager->addAction(action, category);
+
+ category = tr("Edit");
+ foreach(QAction *action, actions->editActions()->actions())
+ m_manager->addAction(action, category);
+
+ category = tr("Tools");
+ foreach(QAction *action, actions->toolActions()->actions())
+ m_manager->addAction(action, category);
+
+ category = tr("Form");
+ foreach(QAction *action, actions->formActions()->actions())
+ m_manager->addAction(action, category);
+
m_manager->addAction(m_configureAction, tr("Toolbars"));
updateToolBarMenu();
}
diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp
index 6776351..a593a76 100644
--- a/tools/designer/src/designer/qdesigner_actions.cpp
+++ b/tools/designer/src/designer/qdesigner_actions.cpp
@@ -107,6 +107,8 @@ QT_BEGIN_NAMESPACE
using namespace qdesigner_internal;
+const char *QDesignerActions::defaultToolbarPropertyName = "__qt_defaultToolBarAction";
+
//#ifdef Q_WS_MAC
# define NONMODAL_PREVIEW
//#endif
@@ -236,6 +238,10 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_helpActions = createHelpActions();
+ m_newFormAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ m_openFormAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ m_saveFormAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+
QDesignerFormWindowManagerInterface *formWindowManager = m_core->formWindowManager();
Q_ASSERT(formWindowManager != 0);
@@ -322,6 +328,9 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_editActions->addAction(formWindowManager->actionLower());
m_editActions->addAction(formWindowManager->actionRaise());
+ formWindowManager->actionLower()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionRaise()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+
//
// edit mode actions
//
@@ -349,6 +358,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
if (QDesignerFormEditorPluginInterface *formEditorPlugin = qobject_cast<QDesignerFormEditorPluginInterface*>(plugin)) {
if (QAction *action = formEditorPlugin->action()) {
m_toolActions->addAction(action);
+ action->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
action->setCheckable(true);
}
}
@@ -376,6 +386,15 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_formActions->addAction(formWindowManager->actionSimplifyLayout());
m_formActions->addAction(createSeparator(this));
+ formWindowManager->actionHorizontalLayout()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionVerticalLayout()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionSplitHorizontal()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionSplitVertical()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionGridLayout()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionFormLayout()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionBreakLayout()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+ formWindowManager->actionAdjustSize()->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
+
m_previewFormAction->setShortcut(tr("CTRL+R"));
m_formActions->addAction(m_previewFormAction);
connect(m_previewManager, SIGNAL(firstPreviewOpened()), this, SLOT(updateCloseAction()));
diff --git a/tools/designer/src/designer/qdesigner_actions.h b/tools/designer/src/designer/qdesigner_actions.h
index 9dfcef1..d8f9e42 100644
--- a/tools/designer/src/designer/qdesigner_actions.h
+++ b/tools/designer/src/designer/qdesigner_actions.h
@@ -113,6 +113,10 @@ public:
QString uiExtension() const;
+ // Boolean dynamic property set on actions to
+ // show them in the default toolbar layout
+ static const char *defaultToolbarPropertyName;
+
public slots:
void activeFormWindowChanged(QDesignerFormWindowInterface *formWindow);
void createForm();
diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp
index b65ce7e..168c468 100644
--- a/tools/designer/src/designer/qdesigner_workbench.cpp
+++ b/tools/designer/src/designer/qdesigner_workbench.cpp
@@ -419,6 +419,7 @@ void QDesignerWorkbench::switchToDockedMode()
m_mode = DockedMode;
const QDesignerSettings settings(m_core);
m_dockedMainWindow = new DockedMainWindow(this, m_toolbarMenu, m_toolWindows);
+ m_dockedMainWindow->setUnifiedTitleAndToolBarOnMac(true);
m_dockedMainWindow->setCloseEventPolicy(MainWindowBase::EmitCloseEventSignal);
connect(m_dockedMainWindow, SIGNAL(closeEventReceived(QCloseEvent*)), this, SLOT(handleCloseEvent(QCloseEvent*)));
connect(m_dockedMainWindow, SIGNAL(fileDropped(QString)), this, SLOT(slotFileDropped(QString)));
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index 77ab2a6..08fedd2 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -722,10 +722,11 @@ int QDesignerPropertySheet::addDynamicProperty(const QString &propName, const QV
else if (value.type() == QVariant::Pixmap)
v = qVariantFromValue(qdesigner_internal::PropertySheetPixmapValue());
else if (value.type() == QVariant::String)
- v = qVariantFromValue(qdesigner_internal::PropertySheetStringValue());
- else if (value.type() == QVariant::KeySequence)
- v = qVariantFromValue(qdesigner_internal::PropertySheetKeySequenceValue());
-
+ v = qVariantFromValue(qdesigner_internal::PropertySheetStringValue(value.toString()));
+ else if (value.type() == QVariant::KeySequence) {
+ const QKeySequence keySequence = qVariantValue<QKeySequence>(value);
+ v = qVariantFromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
+ }
if (d->m_addIndex.contains(propName)) {
const int idx = d->m_addIndex.value(propName);
@@ -1130,7 +1131,7 @@ void QDesignerPropertySheet::setProperty(int index, const QVariant &value)
}
}
- if (isDynamicProperty(index)) {
+ if (isDynamicProperty(index) || isDefaultDynamicProperty(index)) {
if (d->isResourceProperty(index))
d->setResourceProperty(index, value);
if (d->isStringProperty(index))
@@ -1200,10 +1201,17 @@ bool QDesignerPropertySheet::reset(int index)
} else if (isDynamic(index)) {
const QString propName = propertyName(index);
const QVariant oldValue = d->m_addProperties.value(index);
- const QVariant newValue = d->m_info.value(index).defaultValue;
+ const QVariant defaultValue = d->m_info.value(index).defaultValue;
+ QVariant newValue = defaultValue;
+ if (d->isStringProperty(index)) {
+ newValue = qVariantFromValue(qdesigner_internal::PropertySheetStringValue(newValue.toString()));
+ } else if (d->isKeySequenceProperty(index)) {
+ const QKeySequence keySequence = qVariantValue<QKeySequence>(newValue);
+ newValue = qVariantFromValue(qdesigner_internal::PropertySheetKeySequenceValue(keySequence));
+ }
if (oldValue == newValue)
return true;
- d->m_object->setProperty(propName.toUtf8(), newValue);
+ d->m_object->setProperty(propName.toUtf8(), defaultValue);
d->m_addProperties[index] = newValue;
return true;
} else if (!d->m_info.value(index).defaultValue.isNull()) {
diff --git a/tools/qtestlib/wince/cetest/cetest.pro b/tools/qtestlib/wince/cetest/cetest.pro
index 43ed18e..82747da 100644
--- a/tools/qtestlib/wince/cetest/cetest.pro
+++ b/tools/qtestlib/wince/cetest/cetest.pro
@@ -13,8 +13,7 @@ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED QT_NO_CODECS QT_LITE_UNICODE QT
QT_NO_STL QT_NO_COMPRESS QT_NO_DATASTREAM \
QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_NO_THREAD \
QT_NO_SYSTEMLOCALE QT_NO_GEOM_VARIANT \
- QT_NODLL QT_NO_QOBJECT \
- QT_BUILD_QMAKE_NO_GENERATORS
+ QT_NODLL QT_NO_QOBJECT
INCLUDEPATH = \
$$QT_SOURCE_TREE/tools/qtestlib/ce/cetest \
diff --git a/tools/qtestlib/wince/cetest/qmake_include.pri b/tools/qtestlib/wince/cetest/qmake_include.pri
index 8b415b0..35fbc64 100644
--- a/tools/qtestlib/wince/cetest/qmake_include.pri
+++ b/tools/qtestlib/wince/cetest/qmake_include.pri
@@ -5,7 +5,9 @@ SOURCES += \
$$QT_SOURCE_TREE/qmake/option.cpp \
$$QT_SOURCE_TREE/qmake/project.cpp \
$$QT_SOURCE_TREE/qmake/property.cpp \
+ $$QT_SOURCE_TREE/qmake/generators/metamakefile.cpp \
$$QT_SOURCE_TREE/qmake/generators/symbian/initprojectdeploy_symbian.cpp \
$$QT_SOURCE_TREE/tools/shared/symbian/epocroot.cpp \
$$QT_SOURCE_TREE/tools/shared/windows/registry.cpp
+DEFINES += QT_QMAKE_PARSER_ONLY
diff --git a/tools/tools.pro b/tools/tools.pro
index 7598962..f254230 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -35,7 +35,8 @@ mac {
embedded:SUBDIRS += kmap2qmap
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
-!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator
+# We don't need these command line utilities on embedded platforms.
+!wince*:!symbian:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator
embedded: SUBDIRS += makeqpf
!wince*:!cross_compile:SUBDIRS += qdoc3