Commit 25342928 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some deprecated method. Remove extra ;

parent 350f79c2
......@@ -69,9 +69,9 @@ KMixDockWidget::KMixDockWidget(KMixWindow* parent)
connect(this, SIGNAL(secondaryActivateRequested(QPoint)), this, SLOT(dockMute()));
// For bizarre reasons, we wrap the ViewDockAreaPopup in a QMenu. Must relate to how KStatusNotifierItem works.
_dockAreaPopupMenuWrapper = new QMenu(parent);
_volWA = new QWidgetAction(_dockAreaPopupMenuWrapper);
_dockView = new ViewDockAreaPopup(_dockAreaPopupMenuWrapper, "dockArea", 0, QString("no-guiprofile-yet-in-dock"), parent);
_dockAreaPopupMenuWrapper = new QMenu(parent);
_volWA = new QWidgetAction(_dockAreaPopupMenuWrapper);
_dockView = new ViewDockAreaPopup(_dockAreaPopupMenuWrapper, "dockArea", {}, QString("no-guiprofile-yet-in-dock"), parent);
_volWA->setDefaultWidget(_dockView);
_dockAreaPopupMenuWrapper->addAction(_volWA);
connect(contextMenu(), SIGNAL(aboutToShow()), this, SLOT(contextMenuAboutToShow()));
......@@ -277,7 +277,7 @@ void KMixDockWidget::activate(const QPoint &pos)
_dockAreaPopupMenuWrapper->removeAction(_volWA);
delete _volWA;
_volWA = new QWidgetAction(_dockAreaPopupMenuWrapper);
_dockView = new ViewDockAreaPopup(_dockAreaPopupMenuWrapper, "dockArea", 0, QString("no-guiprofile-yet-in-dock"),
_dockView = new ViewDockAreaPopup(_dockAreaPopupMenuWrapper, "dockArea", {}, QString("no-guiprofile-yet-in-dock"),
_kmixMainWindow);
_volWA->setDefaultWidget(_dockView);
_dockAreaPopupMenuWrapper->addAction(_volWA);
......
......@@ -47,7 +47,7 @@ public:
ShowCapture = 0x04,
ShowMixerName = 0x08
};
Q_DECLARE_FLAGS(MDWFlags, MDWFlag);
Q_DECLARE_FLAGS(MDWFlags, MDWFlag)
MixDeviceWidget(shared_ptr<MixDevice> md, MDWFlags flags, ViewBase *view, ProfControl *pctl);
virtual ~MixDeviceWidget() = default;
......
......@@ -27,7 +27,7 @@
class VerticalText : public QWidget
{
public:
VerticalText(QWidget * parent, const QString&, Qt::WindowFlags f = 0);
VerticalText(QWidget * parent, const QString&, Qt::WindowFlags f = {});
~VerticalText();
void setText(const QString& text);
......
......@@ -48,7 +48,7 @@
* Creates an empty View. To populate it with MixDevice instances, you must implement
* initLayout() in your derived class.
*/
ViewBase::ViewBase(QWidget* parent, QString id, Qt::WindowFlags f, ViewBase::ViewFlags vflags, QString guiProfileId, KActionCollection *actionColletion)
ViewBase::ViewBase(QWidget* parent, const QString &id, Qt::WindowFlags f, ViewBase::ViewFlags vflags, const QString &guiProfileId, KActionCollection *actionColletion)
: QWidget(parent, f),
_popMenu(NULL),
_actions(actionColletion),
......
......@@ -54,9 +54,9 @@ public:
HasMenuBar = 0x0001,
MenuBarVisible = 0x0002
};
Q_DECLARE_FLAGS(ViewFlags, ViewFlag);
Q_DECLARE_FLAGS(ViewFlags, ViewFlag)
ViewBase(QWidget* parent, QString id, Qt::WindowFlags f, ViewFlags vflags, QString guiProfileId, KActionCollection* actionCollection = 0);
ViewBase(QWidget* parent, const QString &id, Qt::WindowFlags f, ViewFlags vflags, const QString &guiProfileId, KActionCollection* actionCollection = nullptr);
// The GUI profile will not be removed on destruction,
// as it is pooled and might be applied to a new View.
virtual ~ViewBase() = default;
......
......@@ -48,9 +48,9 @@
#undef RESTORE_VOLUME_BUTTON
ViewDockAreaPopup::ViewDockAreaPopup(QWidget* parent, QString id, ViewBase::ViewFlags vflags, QString guiProfileId,
ViewDockAreaPopup::ViewDockAreaPopup(QWidget* parent, const QString &id, ViewBase::ViewFlags vflags, const QString &guiProfileId,
KMixWindow *dockW) :
ViewBase(parent, id, 0, vflags, guiProfileId), _kmixMainWindow(dockW)
ViewBase(parent, id, {}, vflags, guiProfileId), _kmixMainWindow(dockW)
{
resetRefs();
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
......
......@@ -41,7 +41,7 @@ class ViewDockAreaPopup : public ViewBase
{
Q_OBJECT
public:
ViewDockAreaPopup(QWidget* parent, QString id, ViewBase::ViewFlags vflags, QString guiProfileId, KMixWindow *dockW);
ViewDockAreaPopup(QWidget* parent, const QString &id, ViewBase::ViewFlags vflags, const QString &guiProfileId, KMixWindow *dockW);
virtual ~ViewDockAreaPopup();
QWidget* add(shared_ptr<MixDevice> md) Q_DECL_OVERRIDE;
......
......@@ -114,7 +114,7 @@ QWidget *ViewSliders::add(const shared_ptr<MixDevice> md)
if (md->isEnum()) // control is a switch
{
mdw = new MDWEnum(md, 0, this);
mdw = new MDWEnum(md, {}, this);
m_layoutSwitches->addWidget(mdw);
}
else // control is a slider
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment