forked from qt-creator/qt-creator
Fix warnings that a signal conflicts with a slot of base classes.
In NavigationSubWidget and SideBarWidget
This commit is contained in:
@@ -176,8 +176,8 @@ void NavigationWidget::resizeEvent(QResizeEvent *re)
|
|||||||
NavigationSubWidget *NavigationWidget::insertSubItem(int position)
|
NavigationSubWidget *NavigationWidget::insertSubItem(int position)
|
||||||
{
|
{
|
||||||
NavigationSubWidget *nsw = new NavigationSubWidget(this);
|
NavigationSubWidget *nsw = new NavigationSubWidget(this);
|
||||||
connect(nsw, SIGNAL(split()), this, SLOT(split()));
|
connect(nsw, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
|
||||||
connect(nsw, SIGNAL(close()), this, SLOT(close()));
|
connect(nsw, SIGNAL(closeMe()), this, SLOT(closeSubWidget()));
|
||||||
insertWidget(position, nsw);
|
insertWidget(position, nsw);
|
||||||
m_subWidgets.insert(position, nsw);
|
m_subWidgets.insert(position, nsw);
|
||||||
return nsw;
|
return nsw;
|
||||||
@@ -199,7 +199,7 @@ void NavigationWidget::activateSubWidget()
|
|||||||
m_subWidgets.first()->setFocusWidget();
|
m_subWidgets.first()->setFocusWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigationWidget::split()
|
void NavigationWidget::splitSubWidget()
|
||||||
{
|
{
|
||||||
NavigationSubWidget *original = qobject_cast<NavigationSubWidget *>(sender());
|
NavigationSubWidget *original = qobject_cast<NavigationSubWidget *>(sender());
|
||||||
int pos = indexOf(original) + 1;
|
int pos = indexOf(original) + 1;
|
||||||
@@ -207,7 +207,7 @@ void NavigationWidget::split()
|
|||||||
newnsw->setFactory(original->factory());
|
newnsw->setFactory(original->factory());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigationWidget::close()
|
void NavigationWidget::closeSubWidget()
|
||||||
{
|
{
|
||||||
if (m_subWidgets.count() != 1) {
|
if (m_subWidgets.count() != 1) {
|
||||||
NavigationSubWidget *subWidget = qobject_cast<NavigationSubWidget *>(sender());
|
NavigationSubWidget *subWidget = qobject_cast<NavigationSubWidget *>(sender());
|
||||||
@@ -389,8 +389,8 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget)
|
|||||||
setLayout(lay);
|
setLayout(lay);
|
||||||
lay->addWidget(m_toolBar);
|
lay->addWidget(m_toolBar);
|
||||||
|
|
||||||
connect(splitAction, SIGNAL(clicked()), this, SIGNAL(split()));
|
connect(splitAction, SIGNAL(clicked()), this, SIGNAL(splitMe()));
|
||||||
connect(close, SIGNAL(clicked()), this, SIGNAL(close()));
|
connect(close, SIGNAL(clicked()), this, SIGNAL(closeMe()));
|
||||||
connect(m_navigationComboBox, SIGNAL(currentIndexChanged(int)),
|
connect(m_navigationComboBox, SIGNAL(currentIndexChanged(int)),
|
||||||
this, SLOT(setCurrentIndex(int)));
|
this, SLOT(setCurrentIndex(int)));
|
||||||
|
|
||||||
|
@@ -103,8 +103,8 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void objectAdded(QObject*);
|
void objectAdded(QObject*);
|
||||||
void activateSubWidget();
|
void activateSubWidget();
|
||||||
void split();
|
void splitSubWidget();
|
||||||
void close();
|
void closeSubWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NavigationSubWidget *insertSubItem(int position);
|
NavigationSubWidget *insertSubItem(int position);
|
||||||
@@ -136,8 +136,8 @@ public:
|
|||||||
Core::Command *command(const QString &title) const;
|
Core::Command *command(const QString &title) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void split();
|
void splitMe();
|
||||||
void close();
|
void closeMe();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void objectAdded(QObject*);
|
void objectAdded(QObject*);
|
||||||
|
@@ -101,8 +101,8 @@ SideBarItem *SideBar::item(const QString &title)
|
|||||||
SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &title)
|
SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &title)
|
||||||
{
|
{
|
||||||
SideBarWidget *item = new SideBarWidget(this, title);
|
SideBarWidget *item = new SideBarWidget(this, title);
|
||||||
connect(item, SIGNAL(split()), this, SLOT(split()));
|
connect(item, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
|
||||||
connect(item, SIGNAL(close()), this, SLOT(close()));
|
connect(item, SIGNAL(closeMe()), this, SLOT(closeSubWidget()));
|
||||||
connect(item, SIGNAL(currentWidgetChanged()), this, SLOT(updateWidgets()));
|
connect(item, SIGNAL(currentWidgetChanged()), this, SLOT(updateWidgets()));
|
||||||
insertWidget(position, item);
|
insertWidget(position, item);
|
||||||
m_widgets.insert(position, item);
|
m_widgets.insert(position, item);
|
||||||
@@ -118,7 +118,7 @@ void SideBar::removeSideBarWidget(SideBarWidget *widget)
|
|||||||
widget->deleteLater();
|
widget->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SideBar::split()
|
void SideBar::splitSubWidget()
|
||||||
{
|
{
|
||||||
SideBarWidget *original = qobject_cast<SideBarWidget*>(sender());
|
SideBarWidget *original = qobject_cast<SideBarWidget*>(sender());
|
||||||
int pos = indexOf(original) + 1;
|
int pos = indexOf(original) + 1;
|
||||||
@@ -126,7 +126,7 @@ void SideBar::split()
|
|||||||
updateWidgets();
|
updateWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SideBar::close()
|
void SideBar::closeSubWidget()
|
||||||
{
|
{
|
||||||
if (m_widgets.count() != 1) {
|
if (m_widgets.count() != 1) {
|
||||||
SideBarWidget *widget = qobject_cast<SideBarWidget*>(sender());
|
SideBarWidget *widget = qobject_cast<SideBarWidget*>(sender());
|
||||||
@@ -245,7 +245,7 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &title)
|
|||||||
m_closeButton->setIcon(QIcon(":/core/images/closebutton.png"));
|
m_closeButton->setIcon(QIcon(":/core/images/closebutton.png"));
|
||||||
m_closeButton->setToolTip(tr("Close"));
|
m_closeButton->setToolTip(tr("Close"));
|
||||||
|
|
||||||
connect(m_closeButton, SIGNAL(clicked(bool)), this, SIGNAL(close()));
|
connect(m_closeButton, SIGNAL(clicked(bool)), this, SIGNAL(closeMe()));
|
||||||
|
|
||||||
QWidget *spacerItem = new QWidget(this);
|
QWidget *spacerItem = new QWidget(this);
|
||||||
spacerItem->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
|
spacerItem->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
@@ -111,8 +111,8 @@ public:
|
|||||||
QMap<QString, Core::Command*> shortcutMap() const;
|
QMap<QString, Core::Command*> shortcutMap() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void split();
|
void splitSubWidget();
|
||||||
void close();
|
void closeSubWidget();
|
||||||
void updateWidgets();
|
void updateWidgets();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -146,8 +146,8 @@ public:
|
|||||||
Core::Command *command(const QString &title) const;
|
Core::Command *command(const QString &title) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void split();
|
void splitMe();
|
||||||
void close();
|
void closeMe();
|
||||||
void currentWidgetChanged();
|
void currentWidgetChanged();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
Reference in New Issue
Block a user