Re: [Development] Qt 5.2 header diff: QtWidgets
On 05 Nov 2013, at 19:17, Shaw Andy wrote: > IIRC it wasn’t even compiled into the QtWidgets library, although the > documentation and everything existed, those symbols were never in Qt. Morten > can say 100% at least but that is my understanding and recollection at least. That is correct, the symbols are not in Qt 5.1, confirmed with nm QtWidgets.framework/QtWidgets | grep QMacCocoaViewContainer Morten ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
IIRC it wasn't even compiled into the QtWidgets library, although the documentation and everything existed, those symbols were never in Qt. Morten can say 100% at least but that is my understanding and recollection at least. Andy From: development-bounces+andy.shaw=digia@qt-project.org [mailto:development-bounces+andy.shaw=digia@qt-project.org] On Behalf Of Jake Petroules Sent: 5. november 2013 19:10 To: Thiago Macieira Cc: development@qt-project.org Subject: Re: [Development] Qt 5.2 header diff: QtWidgets On Nov 5, 2013, at 12:55 PM, Thiago Macieira mailto:thiago.macie...@intel.com>> wrote: On terça-feira, 5 de novembro de 2013 12:39:55, Jake Petroules wrote: On Nov 5, 2013, at 12:22 PM, Marc Mutz mailto:marc.m...@kdab.com>> wrote: But can be overloaded on the new types, right. Does this 100% NEED to be reverted? It wasn't even functional until 5.2 IIRC. I really hope this does not have to wait until 6.0, it was a great improvement in usability. We didn't say revert. But we need to restore BC. Unless, of course, you tell us that no one could possibly have been using this because it was so broken. -- Thiago Macieira - thiago.macieira (AT) intel.com<http://intel.com> Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org<mailto:Development@qt-project.org> http://lists.qt-project.org/mailman/listinfo/development Morten merged the port of QMacCocoaViewContainer and QMacNativeWidget to dev on 23 Sept. Prior to that it was unusable. -- Jake Petroules Chief Technology Officer Petroules Corporation · www.petroules.com<http://www.petroules.com> Email: jake.petrou...@petroules.com<mailto:jake.petrou...@petroules.com> ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
On Nov 5, 2013, at 12:55 PM, Thiago Macieira wrote: > On terça-feira, 5 de novembro de 2013 12:39:55, Jake Petroules wrote: >> On Nov 5, 2013, at 12:22 PM, Marc Mutz wrote: >>> But can be overloaded on the new types, right. >> >> Does this 100% NEED to be reverted? It wasn't even functional until 5.2 >> IIRC. >> >> I really hope this does not have to wait until 6.0, it was a great >> improvement in usability. > > We didn't say revert. But we need to restore BC. > > Unless, of course, you tell us that no one could possibly have been using > this > because it was so broken. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > ___ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development Morten merged the port of QMacCocoaViewContainer and QMacNativeWidget to dev on 23 Sept. Prior to that it was unusable. -- Jake Petroules Chief Technology Officer Petroules Corporation · www.petroules.com Email: jake.petrou...@petroules.com___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
On terça-feira, 5 de novembro de 2013 12:39:55, Jake Petroules wrote: > On Nov 5, 2013, at 12:22 PM, Marc Mutz wrote: > > But can be overloaded on the new types, right. > > Does this 100% NEED to be reverted? It wasn't even functional until 5.2 > IIRC. > > I really hope this does not have to wait until 6.0, it was a great > improvement in usability. We didn't say revert. But we need to restore BC. Unless, of course, you tell us that no one could possibly have been using this because it was so broken. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
On Nov 5, 2013, at 12:22 PM, Marc Mutz wrote: > On Tuesday, November 05, 2013 17:51:25 Thiago Macieira wrote: >> On terça-feira, 5 de novembro de 2013 11:09:48, Giuseppe D'Angelo wrote: class Q_WIDGETS_EXPORT QMacCocoaViewContainer : public QWidget { Q_OBJECT public: -QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent = 0); +QMacCocoaViewContainer(NSView *cocoaViewToWrap, QWidget *parent = 0); virtual ~QMacCocoaViewContainer(); -void setCocoaView(void *cocoaViewToWrap); -void *cocoaView() const; +void setCocoaView(NSView *view); +NSView *cocoaView() const; private: Q_DECLARE_PRIVATE(QMacCocoaViewContainer) >>> >>> Isn't this binary and source incompatible? >> >> Yes. >> >> Technically speaking, the cocoaView() const member is still binary >> compatible because we're talking about a Mac here and we know its ABI does >> not encode return types (except for template functions, which this one >> isn't). > > And it very probably is source compatible, because assignemnt to void* still > works, and casts to NSView*, too. > >> But the constructor and the setter are definitely binary incompatible. > > But can be overloaded on the new types, right. Does this 100% NEED to be reverted? It wasn't even functional until 5.2 IIRC. I really hope this does not have to wait until 6.0, it was a great improvement in usability. -- Jake Petroules Chief Technology Officer Petroules Corporation · www.petroules.com Email: jake.petrou...@petroules.com ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
On Tuesday, November 05, 2013 17:51:25 Thiago Macieira wrote: > On terça-feira, 5 de novembro de 2013 11:09:48, Giuseppe D'Angelo wrote: > > > class Q_WIDGETS_EXPORT QMacCocoaViewContainer : public QWidget > > > { > > > > > > Q_OBJECT > > > > > > public: > > > -QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent = > > > 0); +QMacCocoaViewContainer(NSView *cocoaViewToWrap, QWidget > > > *parent = 0); > > > > > > virtual ~QMacCocoaViewContainer(); > > > > > > -void setCocoaView(void *cocoaViewToWrap); > > > -void *cocoaView() const; > > > +void setCocoaView(NSView *view); > > > +NSView *cocoaView() const; > > > > > > private: > > > Q_DECLARE_PRIVATE(QMacCocoaViewContainer) > > > > Isn't this binary and source incompatible? > > Yes. > > Technically speaking, the cocoaView() const member is still binary > compatible because we're talking about a Mac here and we know its ABI does > not encode return types (except for template functions, which this one > isn't). And it very probably is source compatible, because assignemnt to void* still works, and casts to NSView*, too. > But the constructor and the setter are definitely binary incompatible. But can be overloaded on the new types, right. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
On terça-feira, 5 de novembro de 2013 11:09:48, Giuseppe D'Angelo wrote: > > +#ifdef Q_OS_OSX > > +NSMenu* toNSMenu(); > > +void setAsDockMenu(); > > +#endif > > Is it OK to reintroduce platform specific calls in the APIs? I would've > expected this kind of functionality to be provided by QtMacExtras. (No, > I'm not happy about that wceMenu either). Yes. We did the same for QString and QUrl. During the 5.2 cycle, there was quite a discussion on where those methods should be. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
On terça-feira, 5 de novembro de 2013 11:09:48, Giuseppe D'Angelo wrote: > > class Q_WIDGETS_EXPORT QMacCocoaViewContainer : public QWidget > > { > > Q_OBJECT > > > > public: > > -QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent = 0); > > +QMacCocoaViewContainer(NSView *cocoaViewToWrap, QWidget *parent = 0); > > > > virtual ~QMacCocoaViewContainer(); > > > > -void setCocoaView(void *cocoaViewToWrap); > > -void *cocoaView() const; > > +void setCocoaView(NSView *view); > > +NSView *cocoaView() const; > > > > private: > > Q_DECLARE_PRIVATE(QMacCocoaViewContainer) > > Isn't this binary and source incompatible? Yes. Technically speaking, the cocoaView() const member is still binary compatible because we're talking about a Mac here and we know its ABI does not encode return types (except for template functions, which this one isn't). But the constructor and the setter are definitely binary incompatible. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Qt 5.2 header diff: QtWidgets
Il 05/11/2013 01:07, Thiago Macieira ha scritto: Pastebin URL (expires in 24 hours): http://paste.fedoraproject.org/51643/61145013 --- diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index 80a31c4..c7a1d6f 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -112,6 +112,9 @@ Q_SIGNALS: protected: void changeEvent(QEvent *event); +virtual void mouseMoveEvent(QMouseEvent *); +virtual void mouseReleaseEvent(QMouseEvent *); +virtual void keyPressEvent(QKeyEvent *); void done(int result); This is ""dangerous"" -- if a subclass overrode those methods, they won't be called :( Need to carefully examine the code (d928dbbc) to figure out if it's OK to not invoke those methods, or not doing so will break the class. Cf. http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++#Adding_a_reimplemented_virtual_function http://marcmutz.wordpress.com/2010/07/25/bcsc-gotcha-reimplementing-a-virtual-function/ class Q_WIDGETS_EXPORT QFileDialog : public QDialog { @@ -90,7 +90,8 @@ public: DontUseSheet= 0x0008, DontUseNativeDialog = 0x0010, ReadOnly= 0x0020, -HideNameFilterDetails = 0x0040 +HideNameFilterDetails = 0x0040, +DontUseCustomDirectoryIcons = 0x0080 }; Q_DECLARE_FLAGS(Options, Option) @@ -105,9 +106,15 @@ public: inline void setDirectory(const QDir &directory); QDir directory() const; +void setDirectoryUrl(const QUrl &directory); +QUrl directoryUrl() const; + void selectFile(const QString &filename); QStringList selectedFiles() const; +void selectUrl(const QUrl &url); +QList selectedUrls() const; Is this by design? Why one is allowed to select *one* URL, but then retrieve a list of selected ones? Should selectUrl get the same kind of modifiers of QItemSelectionModel::select? + +void setCheckBox(QCheckBox *cb); +QCheckBox* checkBox() const; + Minor, style violation + +void setResizeContentsPrecision(int precision, bool resizeNow = true); +int resizeContentsPrecision() const; Boolean trap, and style violation diff --git a/src/widgets/itemviews/qtableview.h b/src/widgets/itemviews/qtableview.h index 824348d..db95648 100644 --- a/src/widgets/itemviews/qtableview.h +++ b/src/widgets/itemviews/qtableview.h @@ -118,6 +118,8 @@ public: void sortByColumn(int column, Qt::SortOrder order); +QSize viewportSizeHint() const; + Style violation (Q_DECL_OVERRIDE). Same issue with introducing a virtual method override in the middle of a hierarchy. Also, this is protected in QAbstractScrollArea, not public. diff --git a/src/widgets/itemviews/qtreeview.h b/src/widgets/itemviews/qtreeview.h index 73f11f1..a29e9b6 100644 --- a/src/widgets/itemviews/qtreeview.h +++ b/src/widgets/itemviews/qtreeview.h @@ -128,6 +128,9 @@ public: void setWordWrap(bool on); bool wordWrap() const; +void setTreePosition(int logicalIndex); +int treePosition() const; + void keyboardSearch(const QString &search); QRect visualRect(const QModelIndex &index) const; @@ -144,6 +147,8 @@ public: void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles = QVector()); void selectAll(); +QSize viewportSizeHint() const; + Ditto Q_SIGNALS: void expanded(const QModelIndex &index); void collapsed(const QModelIndex &index); @@ -219,6 +224,7 @@ private: friend class QAccessibleTree; friend class QAccessibleTableCell; int visualIndex(const QModelIndex &index) const; +int accessibleTree2Index(const QModelIndex &index) const; Not happy with the function name. Why is this even here? Can't it go into the private? diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h index 6f43c2b..ca5f6d4 100644 --- a/src/widgets/kernel/qlayout.h +++ b/src/widgets/kernel/qlayout.h @@ -130,6 +130,7 @@ public: virtual int count() const = 0; bool isEmpty() const; QSizePolicy::ControlTypes controlTypes() const; +QLayoutItem* replaceWidget(QWidget *from, QWidget *to, bool recursive = true); Style violation + boolean trap diff --git a/src/widgets/util/qsystemtrayicon.h b/src/widgets/util/qsystemtrayicon.h index 278efae..d6ba553 100644 --- a/src/widgets/util/qsystemtrayicon.h +++ b/src/widgets/util/qsystemtrayicon.h @@ -94,8 +94,6 @@ public: static bool supportsMessages(); enum MessageIcon { NoIcon, Information, Warning, Critical }; -void showMessage(const QString &title, const QString &msg, - MessageIcon icon = Information, int msecs = 1); QRect geometry() const; bool isVisible() const; @@ -104,6 +102,8 @@ public Q_SLOTS: void setVisible(bool visible); inline void show() { setVisible(true); }
[Development] Qt 5.2 header diff: QtWidgets
Pastebin URL (expires in 24 hours): http://paste.fedoraproject.org/51643/61145013 --- diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index 80a31c4..c7a1d6f 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -112,6 +112,9 @@ Q_SIGNALS: protected: void changeEvent(QEvent *event); +virtual void mouseMoveEvent(QMouseEvent *); +virtual void mouseReleaseEvent(QMouseEvent *); +virtual void keyPressEvent(QKeyEvent *); void done(int result); private: @@ -120,8 +123,10 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_addCustom()) Q_PRIVATE_SLOT(d_func(), void _q_newHsv(int h, int s, int v)) Q_PRIVATE_SLOT(d_func(), void _q_newColorTypedIn(QRgb rgb)) +Q_PRIVATE_SLOT(d_func(), void _q_nextCustom(int, int)) Q_PRIVATE_SLOT(d_func(), void _q_newCustom(int, int)) Q_PRIVATE_SLOT(d_func(), void _q_newStandard(int, int)) +Q_PRIVATE_SLOT(d_func(), void _q_pickScreenColor()) friend class QColorShower; }; diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index 98d1fd5..404e16c 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -44,6 +44,7 @@ #include #include +#include #include QT_BEGIN_NAMESPACE @@ -58,7 +59,6 @@ class QFileIconProvider; class QFileDialogPrivate; class QAbstractItemDelegate; class QAbstractProxyModel; -class QUrl; class Q_WIDGETS_EXPORT QFileDialog : public QDialog { @@ -90,7 +90,8 @@ public: DontUseSheet= 0x0008, DontUseNativeDialog = 0x0010, ReadOnly= 0x0020, -HideNameFilterDetails = 0x0040 +HideNameFilterDetails = 0x0040, +DontUseCustomDirectoryIcons = 0x0080 }; Q_DECLARE_FLAGS(Options, Option) @@ -105,9 +106,15 @@ public: inline void setDirectory(const QDir &directory); QDir directory() const; +void setDirectoryUrl(const QUrl &directory); +QUrl directoryUrl() const; + void selectFile(const QString &filename); QStringList selectedFiles() const; +void selectUrl(const QUrl &url); +QList selectedUrls() const; + void setNameFilterDetailsVisible(bool enabled); bool isNameFilterDetailsVisible() const; @@ -117,6 +124,10 @@ public: void selectNameFilter(const QString &filter); QString selectedNameFilter() const; +void setMimeTypeFilters(const QStringList &filters); +QStringList mimeTypeFilters() const; +void selectMimeTypeFilter(const QString &filter); + QDir::Filters filter() const; void setFilter(QDir::Filters filters); @@ -184,6 +195,12 @@ Q_SIGNALS: void filesSelected(const QStringList &files); void currentChanged(const QString &path); void directoryEntered(const QString &directory); + +void urlSelected(const QUrl &url); +void urlsSelected(const QList &urls); +void currentUrlChanged(const QUrl &url); +void directoryUrlEntered(const QUrl &directory); + void filterSelected(const QString &filter); public: @@ -195,6 +212,14 @@ public: QString *selectedFilter = 0, Options options = 0); +static QUrl getOpenFileUrl(QWidget *parent = 0, + const QString &caption = QString(), + const QUrl &dir = QUrl(), + const QString &filter = QString(), + QString *selectedFilter = 0, + Options options = 0, + const QStringList &supportedSchemes = QStringList()); + static QString getSaveFileName(QWidget *parent = 0, const QString &caption = QString(), const QString &dir = QString(), @@ -202,11 +227,25 @@ public: QString *selectedFilter = 0, Options options = 0); +static QUrl getSaveFileUrl(QWidget *parent = 0, + const QString &caption = QString(), + const QUrl &dir = QUrl(), + const QString &filter = QString(), + QString *selectedFilter = 0, + Options options = 0, + const QStringList &supportedSchemes = QStringList()); + static QString getExistingDirectory(QWidget *parent = 0, const QString &caption = QString(), const QString &dir = QString(), Options options = ShowDirsOnly); +static QUrl getExistingDirectoryUrl(QWidget *parent = 0, +const QString &caption = QString(), +