QtWidgets: mark some constructors explicit
Non-public API. Change-Id: I68628c51df815f26e8de7522629a611f805673bb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
bc6d677b7e
commit
6f87f2d23f
@ -1677,9 +1677,9 @@ void QDockAreaLayoutInfo::tab(int index, QLayoutItem *dockWidgetItem)
|
||||
QDockAreaLayoutInfo *new_info
|
||||
= new QDockAreaLayoutInfo(sep, dockPos, o, tabBarShape, mainWindow);
|
||||
item_list[index].subinfo = new_info;
|
||||
new_info->item_list.append(item_list.at(index).widgetItem);
|
||||
new_info->item_list.append(QDockAreaLayoutItem(item_list.at(index).widgetItem));
|
||||
item_list[index].widgetItem = 0;
|
||||
new_info->item_list.append(dockWidgetItem);
|
||||
new_info->item_list.append(QDockAreaLayoutItem(dockWidgetItem));
|
||||
new_info->tabbed = true;
|
||||
new_info->updateTabBar();
|
||||
new_info->setCurrentTab(dockWidgetItem->widget());
|
||||
@ -1699,9 +1699,9 @@ void QDockAreaLayoutInfo::split(int index, Qt::Orientation orientation,
|
||||
QDockAreaLayoutInfo *new_info
|
||||
= new QDockAreaLayoutInfo(sep, dockPos, orientation, tabBarShape, mainWindow);
|
||||
item_list[index].subinfo = new_info;
|
||||
new_info->item_list.append(item_list.at(index).widgetItem);
|
||||
new_info->item_list.append(QDockAreaLayoutItem(item_list.at(index).widgetItem));
|
||||
item_list[index].widgetItem = 0;
|
||||
new_info->item_list.append(dockWidgetItem);
|
||||
new_info->item_list.append(QDockAreaLayoutItem(dockWidgetItem));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3081,8 +3081,8 @@ void QDockAreaLayout::addDockWidget(QInternal::DockPosition pos, QDockWidget *do
|
||||
int tbshape = 0;
|
||||
#endif
|
||||
QDockAreaLayoutInfo new_info(&sep, pos, orientation, tbshape, mainWindow);
|
||||
new_info.item_list.append(new QDockAreaLayoutInfo(info));
|
||||
new_info.item_list.append(dockWidgetItem);
|
||||
new_info.item_list.append(QDockAreaLayoutItem(new QDockAreaLayoutInfo(info)));
|
||||
new_info.item_list.append(QDockAreaLayoutItem(dockWidgetItem));
|
||||
info = new_info;
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,9 @@ struct QDockAreaLayoutItem
|
||||
{
|
||||
enum ItemFlags { NoFlags = 0, GapItem = 1, KeepSize = 2 };
|
||||
|
||||
QDockAreaLayoutItem(QLayoutItem *_widgetItem = 0);
|
||||
QDockAreaLayoutItem(QDockAreaLayoutInfo *_subinfo);
|
||||
QDockAreaLayoutItem(QPlaceHolderItem *_placeHolderItem);
|
||||
explicit QDockAreaLayoutItem(QLayoutItem *_widgetItem = 0);
|
||||
explicit QDockAreaLayoutItem(QDockAreaLayoutInfo *_subinfo);
|
||||
explicit QDockAreaLayoutItem(QPlaceHolderItem *_placeHolderItem);
|
||||
QDockAreaLayoutItem(const QDockAreaLayoutItem &other);
|
||||
~QDockAreaLayoutItem();
|
||||
|
||||
@ -109,7 +109,7 @@ class Q_AUTOTEST_EXPORT QPlaceHolderItem
|
||||
{
|
||||
public:
|
||||
QPlaceHolderItem() : hidden(false), window(false) {}
|
||||
QPlaceHolderItem(QWidget *w);
|
||||
explicit QPlaceHolderItem(QWidget *w);
|
||||
|
||||
QString objectName;
|
||||
bool hidden, window;
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
};
|
||||
|
||||
struct SideWidgetEntry {
|
||||
SideWidgetEntry(QWidget *w = 0, QAction *a = 0, int _flags = 0) : widget(w), action(a), flags(_flags) {}
|
||||
explicit SideWidgetEntry(QWidget *w = 0, QAction *a = 0, int _flags = 0) : widget(w), action(a), flags(_flags) {}
|
||||
|
||||
QWidget *widget;
|
||||
QAction *action;
|
||||
|
@ -1945,7 +1945,7 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
|
||||
static_cast<QMainWindow*>(parentWidget()));
|
||||
info->tabbed = true;
|
||||
QLayout *parentLayout = currentHoveredFloat->parentWidget()->layout();
|
||||
info->item_list.append(parentLayout->takeAt(parentLayout->indexOf(currentHoveredFloat)));
|
||||
info->item_list.append(QDockAreaLayoutItem(parentLayout->takeAt(parentLayout->indexOf(currentHoveredFloat))));
|
||||
|
||||
dropTo->setParent(floatingTabs);
|
||||
dropTo->show();
|
||||
|
@ -248,7 +248,7 @@ class CloseButton : public QAbstractButton
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CloseButton(QWidget *parent = 0);
|
||||
explicit CloseButton(QWidget *parent = 0);
|
||||
|
||||
QSize sizeHint() const Q_DECL_OVERRIDE;
|
||||
QSize minimumSizeHint() const Q_DECL_OVERRIDE
|
||||
|
Loading…
x
Reference in New Issue
Block a user