diff options
22 files changed, 10 insertions, 129 deletions
diff --git a/examples/quick/tableview/gameoflife/main.qml b/examples/quick/tableview/gameoflife/main.qml index c25f7e9a18..c3ddbcea5b 100644 --- a/examples/quick/tableview/gameoflife/main.qml +++ b/examples/quick/tableview/gameoflife/main.qml @@ -52,7 +52,6 @@ import QtQuick 2.9 import QtQuick.Window 2.3 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 -import Qt.labs.tableview 1.0 import GameOfLifeModel 1.0 ApplicationWindow { diff --git a/examples/quick/tableview/pixelator/main.qml b/examples/quick/tableview/pixelator/main.qml index f471fc5c6b..38a25f439f 100644 --- a/examples/quick/tableview/pixelator/main.qml +++ b/examples/quick/tableview/pixelator/main.qml @@ -51,7 +51,6 @@ import QtQuick 2.12 import QtQuick.Window 2.12 -import Qt.labs.tableview 1.0 import ImageModel 1.0 diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 828382ba39..653c787384 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -17,8 +17,7 @@ qtHaveModule(quick) { SUBDIRS += \ layouts \ qtquick2 \ - window \ - tableview + window qtHaveModule(testlib): SUBDIRS += testlib qtConfig(systemsemaphore): SUBDIRS += sharedimage diff --git a/src/imports/tableview/plugin.cpp b/src/imports/tableview/plugin.cpp deleted file mode 100644 index 3bd9b72a8d..0000000000 --- a/src/imports/tableview/plugin.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtQml/qqmlextensionplugin.h> -#include <QtQuick/private/qquicktableview_p.h> - -QT_BEGIN_NAMESPACE - -//![class decl] -class QtQuickTableViewPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) -public: - QtQuickTableViewPlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) - {} - - void registerTypes(const char *uri) override - { - Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.tableview")); - qmlRegisterType<QQuickTableView>(uri, 1, 0, "TableView"); - } -}; -//![class decl] - -QT_END_NAMESPACE - -#include "plugin.moc" diff --git a/src/imports/tableview/plugins.qmltypes b/src/imports/tableview/plugins.qmltypes deleted file mode 100644 index 8510b698a9..0000000000 --- a/src/imports/tableview/plugins.qmltypes +++ /dev/null @@ -1,33 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump -nonrelocatable Qt.labs.tableview 1.0' - -Module { - dependencies: ["QtQuick 2.8"] - Component { - name: "QQuickTableView" - defaultProperty: "flickableData" - prototype: "QQuickFlickable" - exports: ["Qt.labs.tableview/TableView 1.0"] - exportMetaObjectRevisions: [0] - attachedType: "QQuickTableViewAttached" - Property { name: "rows"; type: "int"; isReadonly: true } - Property { name: "columns"; type: "int"; isReadonly: true } - Property { name: "rowSpacing"; type: "double" } - Property { name: "columnSpacing"; type: "double" } - Property { name: "cacheBuffer"; type: "int" } - Property { name: "model"; type: "QVariant" } - Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } - } - Component { - name: "QQuickTableViewAttached" - prototype: "QObject" - Property { name: "tableView"; type: "QQuickTableView"; isReadonly: true; isPointer: true } - Property { name: "row"; type: "int"; isReadonly: true } - Property { name: "column"; type: "int"; isReadonly: true } - } -} diff --git a/src/imports/tableview/qmldir b/src/imports/tableview/qmldir deleted file mode 100644 index dac976794a..0000000000 --- a/src/imports/tableview/qmldir +++ /dev/null @@ -1,5 +0,0 @@ -module Qt.labs.tableview -plugin tableviewplugin -classname QtQuickTableViewPlugin -typeinfo plugins.qmltypes - diff --git a/src/imports/tableview/tableview.pro b/src/imports/tableview/tableview.pro deleted file mode 100644 index 97ced65e6b..0000000000 --- a/src/imports/tableview/tableview.pro +++ /dev/null @@ -1,10 +0,0 @@ -CXX_MODULE = qml -TARGET = tableviewplugin -TARGETPATH = Qt/labs/tableview -IMPORT_VERSION = 1.0 - -SOURCES += $$PWD/plugin.cpp - -QT += quick-private qml-private - -load(qml_plugin) diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index fd6788c256..a20150e3b9 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -64,6 +64,9 @@ #if QT_CONFIG(quick_pathview) #include "qquickpathview_p.h" #endif +#if QT_CONFIG(quick_tableview) +#include "qquicktableview_p.h" +#endif #if QT_CONFIG(quick_viewtransitions) #include "qquickitemviewtransition_p.h" #endif @@ -464,6 +467,9 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickGradient, 12>(uri, 2, 12, "Gradient"); qmlRegisterType<QQuickFlickable, 12>(uri, 2, 12, "Flickable"); qmlRegisterType<QQuickText, 12>(uri, 2, 12, "Text"); +#if QT_CONFIG(quick_tableview) + qmlRegisterType<QQuickTableView>(uri, 2, 12, "TableView"); +#endif } static void initResources() diff --git a/src/quick/items/qquicktableview_p.h b/src/quick/items/qquicktableview_p.h index 7e0f9ba8c6..2ffc23d29b 100644 --- a/src/quick/items/qquicktableview_p.h +++ b/src/quick/items/qquicktableview_p.h @@ -51,6 +51,9 @@ // We mean it. // +#include <private/qtquickglobal_p.h> +QT_REQUIRE_CONFIG(quick_tableview); + #include <QtCore/qpointer.h> #include <QtQuick/private/qtquickglobal_p.h> #include <QtQuick/private/qquickflickable_p.h> diff --git a/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml b/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml index 17a10453ea..e6cf9bf2a4 100644 --- a/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml +++ b/tests/auto/quick/qquicktableview/data/alternatingrowheightcolumnwidth.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/contentwidthheight.qml b/tests/auto/quick/qquicktableview/data/contentwidthheight.qml index 7beab21009..6b15e8dd21 100644 --- a/tests/auto/quick/qquicktableview/data/contentwidthheight.qml +++ b/tests/auto/quick/qquicktableview/data/contentwidthheight.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/countingtableview.qml b/tests/auto/quick/qquicktableview/data/countingtableview.qml index dd15442a01..ecd4ca3cc7 100644 --- a/tests/auto/quick/qquicktableview/data/countingtableview.qml +++ b/tests/auto/quick/qquicktableview/data/countingtableview.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { id: root diff --git a/tests/auto/quick/qquicktableview/data/forcelayout.qml b/tests/auto/quick/qquicktableview/data/forcelayout.qml index af00d06837..f03dc2f25b 100644 --- a/tests/auto/quick/qquicktableview/data/forcelayout.qml +++ b/tests/auto/quick/qquicktableview/data/forcelayout.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/plaintableview.qml b/tests/auto/quick/qquicktableview/data/plaintableview.qml index 730d779896..90271eda71 100644 --- a/tests/auto/quick/qquicktableview/data/plaintableview.qml +++ b/tests/auto/quick/qquicktableview/data/plaintableview.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml b/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml index fb0b7516bf..38fca2c5cb 100644 --- a/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml +++ b/tests/auto/quick/qquicktableview/data/qqmllistpropertymodel.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { id: root diff --git a/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml b/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml index 0212d5b9a4..f4a3094dd2 100644 --- a/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml +++ b/tests/auto/quick/qquicktableview/data/tableviewdefaultspacing.qml @@ -28,7 +28,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml b/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml index 13b866f8d2..425b950fce 100644 --- a/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml +++ b/tests/auto/quick/qquicktableview/data/tableviewimplicitsize.qml @@ -28,7 +28,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml b/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml index d4d218f5db..32d1fc9d0d 100644 --- a/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml +++ b/tests/auto/quick/qquicktableview/data/usefaultyrowcolumnprovider.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml b/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml index bc219e0d78..04d12f8d20 100644 --- a/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml +++ b/tests/auto/quick/qquicktableview/data/userowcolumnprovider.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 Item { width: 640 diff --git a/tests/manual/tableview/abstracttablemodel/main.qml b/tests/manual/tableview/abstracttablemodel/main.qml index 6e694c71a2..87e5ee0aa8 100644 --- a/tests/manual/tableview/abstracttablemodel/main.qml +++ b/tests/manual/tableview/abstracttablemodel/main.qml @@ -40,7 +40,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 import QtQml.Models 2.2 -import Qt.labs.tableview 1.0 import TestTableModel 0.1 Window { diff --git a/tests/manual/tableview/listmodel/main.qml b/tests/manual/tableview/listmodel/main.qml index 53cc1ed141..dd0de60555 100644 --- a/tests/manual/tableview/listmodel/main.qml +++ b/tests/manual/tableview/listmodel/main.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 import QtQml.Models 2.2 Window { diff --git a/tests/manual/tableview/storagemodel/main.qml b/tests/manual/tableview/storagemodel/main.qml index ba73c7e5bf..2603fba0e2 100644 --- a/tests/manual/tableview/storagemodel/main.qml +++ b/tests/manual/tableview/storagemodel/main.qml @@ -39,7 +39,6 @@ import QtQuick 2.12 import QtQuick.Window 2.3 -import Qt.labs.tableview 1.0 import StorageModel 0.1 Window { |