summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-12-09 13:18:21 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-15 19:53:46 +0100
commit6387137cdb7ed76e0a16731ae580727bd41e24d1 (patch)
treee9b11d532d1da8723e03b61c79635d718d56688e /src
parent96cf50b2ffad530caa41afad13d4e64b2fc6fcf7 (diff)
downloadqttools-6387137cdb7ed76e0a16731ae580727bd41e24d1.tar.gz
Qt Designer/QtUiLoader: Remove support for QWorkspace.
Change-Id: Ic0ffb13c5d30528800c1beae85d5224e8f2f7104 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/designer/src/components/formeditor/formeditor.cpp3
-rw-r--r--src/designer/src/components/formeditor/formeditor.pri2
-rw-r--r--src/designer/src/components/formeditor/formwindowmanager.cpp2
-rw-r--r--src/designer/src/components/formeditor/qdesigner_resource.cpp3
-rw-r--r--src/designer/src/components/formeditor/qmdiarea_container.h3
-rw-r--r--src/designer/src/components/formeditor/qworkspace_container.cpp100
-rw-r--r--src/designer/src/components/formeditor/qworkspace_container.h79
-rw-r--r--src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp13
-rw-r--r--src/designer/src/components/taskmenu/containerwidget_taskmenu.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_promotion.cpp1
-rw-r--r--src/designer/src/lib/shared/widgetdatabase.cpp3
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp7
-rw-r--r--src/designer/src/lib/uilib/widgets.table3
13 files changed, 2 insertions, 219 deletions
diff --git a/src/designer/src/components/formeditor/formeditor.cpp b/src/designer/src/components/formeditor/formeditor.cpp
index fa202a3fd..0618a17d3 100644
--- a/src/designer/src/components/formeditor/formeditor.cpp
+++ b/src/designer/src/components/formeditor/formeditor.cpp
@@ -48,7 +48,6 @@
#include "widgetfactory_p.h"
#include "formwindowmanager.h"
#include "qmainwindow_container.h"
-#include "qworkspace_container.h"
#include "qmdiarea_container.h"
#include "qwizard_container.h"
#include "default_container.h"
@@ -111,7 +110,6 @@ FormEditor::FormEditor(QObject *parent)
QMainWindowContainerFactory::registerExtension(mgr, containerExtensionId);
QDockWidgetContainerFactory::registerExtension(mgr, containerExtensionId);
QScrollAreaContainerFactory::registerExtension(mgr, containerExtensionId);
- QWorkspaceContainerFactory::registerExtension(mgr, containerExtensionId);
QMdiAreaContainerFactory::registerExtension(mgr, containerExtensionId);
QWizardContainerFactory::registerExtension(mgr, containerExtensionId);
@@ -132,7 +130,6 @@ FormEditor::FormEditor(QObject *parent)
QToolBoxWidgetPropertySheetFactory::registerExtension(mgr);
QTabWidgetPropertySheetFactory::registerExtension(mgr);
QMdiAreaPropertySheetFactory::registerExtension(mgr);
- QWorkspacePropertySheetFactory::registerExtension(mgr);
QWizardPagePropertySheetFactory::registerExtension(mgr);
QWizardPropertySheetFactory::registerExtension(mgr);
diff --git a/src/designer/src/components/formeditor/formeditor.pri b/src/designer/src/components/formeditor/formeditor.pri
index 2ec3bffe7..6b5156157 100644
--- a/src/designer/src/components/formeditor/formeditor.pri
+++ b/src/designer/src/components/formeditor/formeditor.pri
@@ -24,7 +24,6 @@ HEADERS += $$PWD/qdesigner_resource.h \
$$PWD/default_container.h \
$$PWD/default_actionprovider.h \
$$PWD/qmainwindow_container.h \
- $$PWD/qworkspace_container.h \
$$PWD/qmdiarea_container.h \
$$PWD/qwizard_container.h \
$$PWD/default_layoutdecoration.h \
@@ -52,7 +51,6 @@ SOURCES += $$PWD/qdesigner_resource.cpp \
$$PWD/spacer_propertysheet.cpp \
$$PWD/line_propertysheet.cpp \
$$PWD/qmainwindow_container.cpp \
- $$PWD/qworkspace_container.cpp \
$$PWD/qmdiarea_container.cpp \
$$PWD/qwizard_container.cpp \
$$PWD/default_container.cpp \
diff --git a/src/designer/src/components/formeditor/formwindowmanager.cpp b/src/designer/src/components/formeditor/formwindowmanager.cpp
index 93b9a9651..12a0cc2de 100644
--- a/src/designer/src/components/formeditor/formwindowmanager.cpp
+++ b/src/designer/src/components/formeditor/formwindowmanager.cpp
@@ -215,7 +215,7 @@ bool FormWindowManager::eventFilter(QObject *o, QEvent *e)
}
if (QWidget *managedWidget = findManagedWidget(fw, widget)) {
- // Prevent MDI and QWorkspace subwindows from being closed by clicking at the title bar
+ // Prevent MDI subwindows from being closed by clicking at the title bar
if (managedWidget != widget && eventType == QEvent::Close) {
e->ignore();
return true;
diff --git a/src/designer/src/components/formeditor/qdesigner_resource.cpp b/src/designer/src/components/formeditor/qdesigner_resource.cpp
index 84708141e..1ca132103 100644
--- a/src/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/src/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -101,7 +101,6 @@
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QSplitter>
#include <QtWidgets/QMdiArea>
-#include <QtWidgets/QWorkspace>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QFileDialog>
#include <QtWidgets/QHeaderView>
@@ -1530,7 +1529,7 @@ static inline bool checkContainerProperty(const QWidget *w, const QString &prope
return QTabWidgetPropertySheet::checkProperty(propertyName);
if (qobject_cast<const QStackedWidget *>(w))
return QStackedWidgetPropertySheet::checkProperty(propertyName);
- if (qobject_cast<const QMdiArea *>(w) || qobject_cast<const QWorkspace *>(w))
+ if (qobject_cast<const QMdiArea *>(w))
return QMdiAreaPropertySheet::checkProperty(propertyName);
return true;
}
diff --git a/src/designer/src/components/formeditor/qmdiarea_container.h b/src/designer/src/components/formeditor/qmdiarea_container.h
index d7bd49589..c275c368c 100644
--- a/src/designer/src/components/formeditor/qmdiarea_container.h
+++ b/src/designer/src/components/formeditor/qmdiarea_container.h
@@ -49,7 +49,6 @@
#include <extensionfactory_p.h>
#include <QtWidgets/QMdiArea>
-#include <QtWidgets/QWorkspace>
QT_BEGIN_NAMESPACE
@@ -79,7 +78,6 @@ private:
};
// PropertySheet for QMdiArea: Fakes window title and name.
-// Also works for a QWorkspace as it relies on the container extension.
class QMdiAreaPropertySheet: public QDesignerPropertySheet
{
@@ -111,7 +109,6 @@ private:
typedef ExtensionFactory<QDesignerContainerExtension, QMdiArea, QMdiAreaContainer> QMdiAreaContainerFactory;
typedef QDesignerPropertySheetFactory<QMdiArea, QMdiAreaPropertySheet> QMdiAreaPropertySheetFactory;
-typedef QDesignerPropertySheetFactory<QWorkspace, QMdiAreaPropertySheet> QWorkspacePropertySheetFactory;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/qworkspace_container.cpp b/src/designer/src/components/formeditor/qworkspace_container.cpp
deleted file mode 100644
index d3fde23f1..000000000
--- a/src/designer/src/components/formeditor/qworkspace_container.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Designer of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qworkspace_container.h"
-#include "qmdiarea_container.h"
-
-#include <QtWidgets/QWorkspace>
-
-QT_BEGIN_NAMESPACE
-
-namespace qdesigner_internal {
-
-QWorkspaceContainer::QWorkspaceContainer(QWorkspace *widget, QObject *parent)
- : QObject(parent),
- m_workspace(widget)
-{
-}
-
-int QWorkspaceContainer::count() const
-{
- return m_workspace->windowList(QWorkspace::CreationOrder).count();
-}
-
-QWidget *QWorkspaceContainer::widget(int index) const
-{
- if (index < 0)
- return 0;
- return m_workspace->windowList(QWorkspace::CreationOrder).at(index);
-}
-
-int QWorkspaceContainer::currentIndex() const
-{
- if (QWidget *aw = m_workspace->activeWindow())
- return m_workspace->windowList(QWorkspace::CreationOrder).indexOf(aw);
- return -1;
-}
-
-void QWorkspaceContainer::setCurrentIndex(int index)
-{
- m_workspace->setActiveWindow(m_workspace->windowList(QWorkspace::CreationOrder).at(index));
-}
-
-void QWorkspaceContainer::addWidget(QWidget *widget)
-{
- QWidget *frame = m_workspace->addWindow(widget, Qt::Window);
- frame->show();
- m_workspace->cascade();
- QMdiAreaContainer::positionNewMdiChild(m_workspace, frame);
-}
-
-void QWorkspaceContainer::insertWidget(int, QWidget *widget)
-{
- addWidget(widget);
-}
-
-void QWorkspaceContainer::remove(int /* index */)
-{
- // nothing to do here, reparenting to formwindow is apparently sufficient
-}
-}
-
-QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/qworkspace_container.h b/src/designer/src/components/formeditor/qworkspace_container.h
deleted file mode 100644
index ce5151574..000000000
--- a/src/designer/src/components/formeditor/qworkspace_container.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Designer of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QWORKSPACE_CONTAINER_H
-#define QWORKSPACE_CONTAINER_H
-
-#include <QtDesigner/QDesignerContainerExtension>
-#include <QtDesigner/QExtensionFactory>
-
-#include <extensionfactory_p.h>
-#include <QtWidgets/QWorkspace>
-
-QT_BEGIN_NAMESPACE
-
-namespace qdesigner_internal {
-
-class QWorkspaceContainer: public QObject, public QDesignerContainerExtension
-{
- Q_OBJECT
- Q_INTERFACES(QDesignerContainerExtension)
-public:
- explicit QWorkspaceContainer(QWorkspace *widget, QObject *parent = 0);
-
- virtual int count() const;
- virtual QWidget *widget(int index) const;
- virtual int currentIndex() const;
- virtual void setCurrentIndex(int index);
- virtual void addWidget(QWidget *widget);
- virtual void insertWidget(int index, QWidget *widget);
- virtual void remove(int index);
-
-private:
- QWorkspace *m_workspace;
-};
-
-typedef ExtensionFactory<QDesignerContainerExtension, QWorkspace, QWorkspaceContainer> QWorkspaceContainerFactory;
-} // namespace qdesigner_internal
-
-QT_END_NAMESPACE
-
-#endif // QWORKSPACE_CONTAINER_H
diff --git a/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp b/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp
index 475735c5c..34a770b2e 100644
--- a/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp
+++ b/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp
@@ -58,7 +58,6 @@
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QScrollArea>
#include <QtWidgets/QMdiArea>
-#include <QtWidgets/QWorkspace>
#include <QtWidgets/QWizard>
#include <QtWidgets/QMenu>
@@ -269,16 +268,6 @@ MdiContainerWidgetTaskMenu::MdiContainerWidgetTaskMenu(QMdiArea *m, QObject *par
connect(m_cascadeAction, SIGNAL(triggered()), m, SLOT(cascadeSubWindows()));
}
-MdiContainerWidgetTaskMenu::MdiContainerWidgetTaskMenu(QWorkspace *m, QObject *parent) :
- ContainerWidgetTaskMenu(m, MdiContainer, parent)
-{
- initializeActions();
- connect(m_nextAction, SIGNAL(triggered()), m, SLOT(activateNextWindow()));
- connect(m_previousAction, SIGNAL(triggered()), m, SLOT(activatePreviousWindow()));
- connect(m_tileAction, SIGNAL(triggered()),m , SLOT(tile()));
- connect(m_cascadeAction, SIGNAL(triggered()), m, SLOT(cascade()));
-}
-
void MdiContainerWidgetTaskMenu::initializeActions()
{
m_nextAction =new QAction(tr("Next Subwindow"), this);
@@ -341,8 +330,6 @@ QObject *ContainerWidgetTaskMenuFactory::createExtension(QObject *object, const
if (QMdiArea* ma = qobject_cast<QMdiArea*>(widget))
return new MdiContainerWidgetTaskMenu(ma, parent);
- if (QWorkspace *ws = qobject_cast<QWorkspace*>(widget))
- return new MdiContainerWidgetTaskMenu(ws, parent);
if (QWizard *wz = qobject_cast<QWizard *>(widget))
return new WizardContainerWidgetTaskMenu(wz, parent);
return new ContainerWidgetTaskMenu(widget, PageContainer, parent);
diff --git a/src/designer/src/components/taskmenu/containerwidget_taskmenu.h b/src/designer/src/components/taskmenu/containerwidget_taskmenu.h
index 2305104d5..4f6aeb3e3 100644
--- a/src/designer/src/components/taskmenu/containerwidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/containerwidget_taskmenu.h
@@ -56,7 +56,6 @@ class QDesignerFormEditorInterface;
class QDesignerContainerExtension;
class QAction;
class QMdiArea;
-class QWorkspace;
class QMenu;
class QWizard;
@@ -127,7 +126,6 @@ class MdiContainerWidgetTaskMenu : public ContainerWidgetTaskMenu {
Q_OBJECT
public:
explicit MdiContainerWidgetTaskMenu(QMdiArea *m, QObject *parent = 0);
- explicit MdiContainerWidgetTaskMenu(QWorkspace *m, QObject *parent = 0);
virtual QList<QAction*> taskActions() const;
private:
diff --git a/src/designer/src/lib/shared/qdesigner_promotion.cpp b/src/designer/src/lib/shared/qdesigner_promotion.cpp
index 4c3ad4791..8b2a9119e 100644
--- a/src/designer/src/lib/shared/qdesigner_promotion.cpp
+++ b/src/designer/src/lib/shared/qdesigner_promotion.cpp
@@ -67,7 +67,6 @@ namespace {
rc.insert(QStringLiteral("Spacer"));
rc.insert(QStringLiteral("QMainWindow"));
rc.insert(QStringLiteral("QDialog"));
- rc.insert(QStringLiteral("QWorkspace"));
rc.insert(QStringLiteral("QMdiArea"));
rc.insert(QStringLiteral("QMdiSubWindow"));
}
diff --git a/src/designer/src/lib/shared/widgetdatabase.cpp b/src/designer/src/lib/shared/widgetdatabase.cpp
index 7c7caf828..29a9ae859 100644
--- a/src/designer/src/lib/shared/widgetdatabase.cpp
+++ b/src/designer/src/lib/shared/widgetdatabase.cpp
@@ -313,7 +313,6 @@ WidgetDataBase::WidgetDataBase(QDesignerFormEditorInterface *core, QObject *pare
item(indexOfClassName(QStringLiteral("QDockWidget")))->setContainer(true);
item(indexOfClassName(QStringLiteral("QDesignerDockWidget")))->setContainer(true);
item(indexOfClassName(QStringLiteral("QMdiArea")))->setContainer(true);
- item(indexOfClassName(QStringLiteral("QWorkspace")))->setContainer(true);
item(indexOfClassName(QStringLiteral("QWizard")))->setContainer(true);
item(indexOfClassName(QStringLiteral("QWizardPage")))->setContainer(true);
@@ -508,8 +507,6 @@ static inline bool suitableForNewForm(const QString &className)
{
if (className.isEmpty()) // Missing custom widget information
return false;
- if (className == QStringLiteral("QWorkspace"))
- return false;
if (className == QStringLiteral("QSplitter"))
return false;
if (className.startsWith(QStringLiteral("QDesigner")) || className.startsWith(QStringLiteral("QLayout")))
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index 62946196a..0e0cd2781 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -596,13 +596,6 @@ bool QAbstractFormBuilder::addItem(DomWidget *ui_widget, QWidget *widget, QWidge
}
#endif
-#ifndef QT_NO_WORKSPACE
- else if (QWorkspace *ws = qobject_cast<QWorkspace*>(parentWidget)) {
- ws->addWindow(widget);
- return true;
- }
-#endif
-
#ifndef QT_NO_DOCKWIDGET
else if (QDockWidget *dockWidget = qobject_cast<QDockWidget*>(parentWidget)) {
dockWidget->setWidget(widget);
diff --git a/src/designer/src/lib/uilib/widgets.table b/src/designer/src/lib/uilib/widgets.table
index 9b8727849..420213933 100644
--- a/src/designer/src/lib/uilib/widgets.table
+++ b/src/designer/src/lib/uilib/widgets.table
@@ -106,9 +106,6 @@ DECLARE_WIDGET(QTreeView, "")
DECLARE_WIDGET(QTreeWidget, "")
#endif
DECLARE_WIDGET(QWidget, "")
-#ifndef QT_NO_WORKSPACE
-DECLARE_WIDGET(QWorkspace, "")
-#endif
#ifndef QT_NO_SPLITTER
DECLARE_WIDGET(QSplitter, "")
#endif