aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickdialogs2/quickdialogs2utils
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-08-12 14:39:51 +0200
committerMitch Curtis <mitch.curtis@qt.io>2021-08-16 12:52:59 +0200
commit809339d1484cf556512534367b8170bc26baf072 (patch)
tree12871313b658f36d058b5ef25af1e247e9c46ce9 /src/quickdialogs2/quickdialogs2utils
parentb01b4f00eae8022c6a97d90f54dac395144ae095 (diff)
Remove qtquickcontrols2 sources and explain where they wentHEADdev
Now that qtquickcontrols2 has been merged into qtdeclarative, we should make it obvious that this repo should no longer be used, by preventing it from being built. Task-number: QTBUG-95173 Pick-to: 6.2 Change-Id: I95bd6a214f3d75a865ab163ee0a1f9ffbeb7a051 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quickdialogs2/quickdialogs2utils')
-rw-r--r--src/quickdialogs2/quickdialogs2utils/CMakeLists.txt23
-rw-r--r--src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter.cpp158
-rw-r--r--src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter_p.h102
-rw-r--r--src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h67
4 files changed, 0 insertions, 350 deletions
diff --git a/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt b/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt
deleted file mode 100644
index 0242ffcf..00000000
--- a/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# This library exists because QuickDialogs2 and QuickDialogs2QuickImpl
-# both need QQuickNameFilter. QQuickNameFilter was originally in
-# QuickDialogs2. Since QuickDialogs2 already links to
-# QuickDialogs2QuickImpl, making the latter link to the former (to get
-# access to QQuickNameFilter) would result in a circular dependency,
-# so we have this library as a result.
-
-qt_internal_add_module(QuickDialogs2Utils
- SOURCES
- qquickfilenamefilter.cpp
- qquickfilenamefilter_p.h
- qtquickdialogs2utilsglobal_p.h
- DEFINES
- QT_BUILD_QUICKDIALOGS2UTILS_LIB
- QT_NO_CAST_FROM_ASCII
- QT_NO_CAST_TO_ASCII
- INCLUDE_DIRECTORIES
- ${CMAKE_CURRENT_SOURCE_DIR}
- LIBRARIES
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
-)
diff --git a/src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter.cpp b/src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter.cpp
deleted file mode 100644
index bada00d1..00000000
--- a/src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later 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 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickfilenamefilter_p.h"
-
-#include <QtCore/qloggingcategory.h>
-
-QT_BEGIN_NAMESPACE
-
-Q_LOGGING_CATEGORY(lcFileNameFilter, "qt.quick.dialogs.qquickfilenamefilter")
-
-QQuickFileNameFilter::QQuickFileNameFilter(QObject *parent)
- : QObject(parent), m_index(-1)
-{
-}
-
-int QQuickFileNameFilter::index() const
-{
- return m_index;
-}
-
-void QQuickFileNameFilter::setIndex(int index)
-{
- if (m_index == index)
- return;
-
- m_index = index;
- emit indexChanged(index);
-}
-
-QString QQuickFileNameFilter::name() const
-{
- return m_name;
-}
-
-QStringList QQuickFileNameFilter::extensions() const
-{
- return m_extensions;
-}
-
-QStringList QQuickFileNameFilter::globs() const
-{
- return m_globs;
-}
-
-QSharedPointer<QFileDialogOptions> QQuickFileNameFilter::options() const
-{
- return m_options;
-}
-
-void QQuickFileNameFilter::setOptions(const QSharedPointer<QFileDialogOptions> &options)
-{
- m_options = options;
-}
-
-static QString extractName(const QString &filter)
-{
- return filter.left(filter.indexOf(QLatin1Char('(')) - 1);
-}
-
-static QString extractExtension(QStringView filter)
-{
- return filter.mid(filter.indexOf(QLatin1Char('.')) + 1).toString();
-}
-
-static void extractExtensionsAndGlobs(QStringView filter, QStringList &extensions, QStringList &globs)
-{
- extensions.clear();
- globs.clear();
-
- const int from = filter.indexOf(QLatin1Char('('));
- const int to = filter.lastIndexOf(QLatin1Char(')')) - 1;
- if (from >= 0 && from < to) {
- const QStringView ref = filter.mid(from + 1, to - from);
- const QList<QStringView> exts = ref.split(QLatin1Char(' '), Qt::SkipEmptyParts);
- // For example, given the filter "HTML files (*.html *.htm)",
- // "ref" would be "*.html" and "*.htm".
- for (const QStringView &ref : exts) {
- extensions += extractExtension(ref);
- globs += ref.toString();
- }
- }
-}
-
-void QQuickFileNameFilter::update(const QString &filter)
-{
- const QStringList filters = nameFilters();
-
- const int oldIndex = m_index;
- const QString oldName = m_name;
- const QStringList oldExtensions = m_extensions;
- const QStringList oldGlobs = m_globs;
-
- m_index = filters.indexOf(filter);
- m_name = extractName(filter);
- extractExtensionsAndGlobs(filter, m_extensions, m_globs);
-
- if (oldIndex != m_index)
- emit indexChanged(m_index);
- if (oldName != m_name)
- emit nameChanged(m_name);
- if (oldExtensions != m_extensions)
- emit extensionsChanged(m_extensions);
- if (oldGlobs != m_globs)
- emit globsChanged(m_globs);
-
- qCDebug(lcFileNameFilter).nospace() << "update called on " << this << " of " << parent()
- << " with filter " << filter << " (current filters are " << filters << "):"
- << "\n old index=" << oldIndex << "new index=" << m_index
- << "\n old name=" << oldName << "new name=" << m_name
- << "\n old extensions=" << oldExtensions << "new extensions=" << m_extensions
- << "\n old glob=s" << oldGlobs << "new globs=" << m_globs;
-}
-
-QStringList QQuickFileNameFilter::nameFilters() const
-{
- return m_options ? m_options->nameFilters() : QStringList();
-}
-
-QString QQuickFileNameFilter::nameFilter(int index) const
-{
- return m_options ? m_options->nameFilters().value(index) : QString();
-}
-
-QT_END_NAMESPACE
diff --git a/src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter_p.h b/src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter_p.h
deleted file mode 100644
index 586da869..00000000
--- a/src/quickdialogs2/quickdialogs2utils/qquickfilenamefilter_p.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later 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 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKFILENAMEFILTER_P_H
-#define QQUICKFILENAMEFILTER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qobject.h>
-#include <QtCore/qsharedpointer.h>
-#include <QtCore/qstringlist.h>
-#include <QtGui/qpa/qplatformdialoghelper.h>
-
-#include "qtquickdialogs2utilsglobal_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT QQuickFileNameFilter : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int index READ index WRITE setIndex NOTIFY indexChanged FINAL)
- Q_PROPERTY(QString name READ name NOTIFY nameChanged FINAL)
- Q_PROPERTY(QStringList extensions READ extensions NOTIFY extensionsChanged FINAL)
- Q_PROPERTY(QStringList globs READ globs NOTIFY globsChanged FINAL)
-
-public:
- explicit QQuickFileNameFilter(QObject *parent = nullptr);
-
- int index() const;
- void setIndex(int index);
-
- QString name() const;
- QStringList extensions() const;
- QStringList globs() const;
-
- QSharedPointer<QFileDialogOptions> options() const;
- void setOptions(const QSharedPointer<QFileDialogOptions> &options);
-
- void update(const QString &filter);
-
-Q_SIGNALS:
- void indexChanged(int index);
- void nameChanged(const QString &name);
- void extensionsChanged(const QStringList &extensions);
- void globsChanged(const QStringList &globs);
-
-private:
- QStringList nameFilters() const;
- QString nameFilter(int index) const;
-
- int m_index;
- QString m_name;
- QStringList m_extensions;
- QStringList m_globs;
- QSharedPointer<QFileDialogOptions> m_options;
-};
-
-QT_END_NAMESPACE
-
-#endif // QQUICKFILENAMEFILTER_P_H
diff --git a/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h b/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h
deleted file mode 100644
index 52f7a397..00000000
--- a/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick Dialogs module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later 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 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTQUICKDIALOGS2UTILSGLOBAL_P_H
-#define QTQUICKDIALOGS2UTILSGLOBAL_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qglobal.h>
-
-QT_BEGIN_NAMESPACE
-
-#ifndef QT_STATIC
-# if defined(QT_BUILD_QUICKDIALOGS2UTILS_LIB)
-# define Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT Q_DECL_EXPORT
-# else
-# define Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT Q_DECL_IMPORT
-# endif
-#else
-# define Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT
-#endif
-
-QT_END_NAMESPACE
-
-#endif // QTQUICKDIALOGS2UTILSUTILSGLOBAL_P_H