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:
Marc Mutz 2015-07-11 01:33:30 +02:00 committed by Simon Hausmann
parent bc6d677b7e
commit 6f87f2d23f
5 changed files with 13 additions and 13 deletions

View File

@ -1677,9 +1677,9 @@ void QDockAreaLayoutInfo::tab(int index, QLayoutItem *dockWidgetItem)
QDockAreaLayoutInfo *new_info QDockAreaLayoutInfo *new_info
= new QDockAreaLayoutInfo(sep, dockPos, o, tabBarShape, mainWindow); = new QDockAreaLayoutInfo(sep, dockPos, o, tabBarShape, mainWindow);
item_list[index].subinfo = new_info; 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; item_list[index].widgetItem = 0;
new_info->item_list.append(dockWidgetItem); new_info->item_list.append(QDockAreaLayoutItem(dockWidgetItem));
new_info->tabbed = true; new_info->tabbed = true;
new_info->updateTabBar(); new_info->updateTabBar();
new_info->setCurrentTab(dockWidgetItem->widget()); new_info->setCurrentTab(dockWidgetItem->widget());
@ -1699,9 +1699,9 @@ void QDockAreaLayoutInfo::split(int index, Qt::Orientation orientation,
QDockAreaLayoutInfo *new_info QDockAreaLayoutInfo *new_info
= new QDockAreaLayoutInfo(sep, dockPos, orientation, tabBarShape, mainWindow); = new QDockAreaLayoutInfo(sep, dockPos, orientation, tabBarShape, mainWindow);
item_list[index].subinfo = new_info; 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; 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; int tbshape = 0;
#endif #endif
QDockAreaLayoutInfo new_info(&sep, pos, orientation, tbshape, mainWindow); QDockAreaLayoutInfo new_info(&sep, pos, orientation, tbshape, mainWindow);
new_info.item_list.append(new QDockAreaLayoutInfo(info)); new_info.item_list.append(QDockAreaLayoutItem(new QDockAreaLayoutInfo(info)));
new_info.item_list.append(dockWidgetItem); new_info.item_list.append(QDockAreaLayoutItem(dockWidgetItem));
info = new_info; info = new_info;
} }

View File

@ -82,9 +82,9 @@ struct QDockAreaLayoutItem
{ {
enum ItemFlags { NoFlags = 0, GapItem = 1, KeepSize = 2 }; enum ItemFlags { NoFlags = 0, GapItem = 1, KeepSize = 2 };
QDockAreaLayoutItem(QLayoutItem *_widgetItem = 0); explicit QDockAreaLayoutItem(QLayoutItem *_widgetItem = 0);
QDockAreaLayoutItem(QDockAreaLayoutInfo *_subinfo); explicit QDockAreaLayoutItem(QDockAreaLayoutInfo *_subinfo);
QDockAreaLayoutItem(QPlaceHolderItem *_placeHolderItem); explicit QDockAreaLayoutItem(QPlaceHolderItem *_placeHolderItem);
QDockAreaLayoutItem(const QDockAreaLayoutItem &other); QDockAreaLayoutItem(const QDockAreaLayoutItem &other);
~QDockAreaLayoutItem(); ~QDockAreaLayoutItem();
@ -109,7 +109,7 @@ class Q_AUTOTEST_EXPORT QPlaceHolderItem
{ {
public: public:
QPlaceHolderItem() : hidden(false), window(false) {} QPlaceHolderItem() : hidden(false), window(false) {}
QPlaceHolderItem(QWidget *w); explicit QPlaceHolderItem(QWidget *w);
QString objectName; QString objectName;
bool hidden, window; bool hidden, window;

View File

@ -108,7 +108,7 @@ public:
}; };
struct SideWidgetEntry { 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; QWidget *widget;
QAction *action; QAction *action;

View File

@ -1945,7 +1945,7 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
static_cast<QMainWindow*>(parentWidget())); static_cast<QMainWindow*>(parentWidget()));
info->tabbed = true; info->tabbed = true;
QLayout *parentLayout = currentHoveredFloat->parentWidget()->layout(); 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->setParent(floatingTabs);
dropTo->show(); dropTo->show();

View File

@ -248,7 +248,7 @@ class CloseButton : public QAbstractButton
Q_OBJECT Q_OBJECT
public: public:
CloseButton(QWidget *parent = 0); explicit CloseButton(QWidget *parent = 0);
QSize sizeHint() const Q_DECL_OVERRIDE; QSize sizeHint() const Q_DECL_OVERRIDE;
QSize minimumSizeHint() const Q_DECL_OVERRIDE QSize minimumSizeHint() const Q_DECL_OVERRIDE