refactor: Remove the NullablePtr class (#5091)
This commit is contained in:
@@ -911,7 +911,7 @@ void Split::insertTextToInput(const QString &text)
|
||||
void Split::showChangeChannelPopup(const char *dialogTitle, bool empty,
|
||||
std::function<void(bool)> callback)
|
||||
{
|
||||
if (this->selectChannelDialog_.hasElement())
|
||||
if (!this->selectChannelDialog_.isNull())
|
||||
{
|
||||
this->selectChannelDialog_->raise();
|
||||
|
||||
@@ -935,7 +935,6 @@ void Split::showChangeChannelPopup(const char *dialogTitle, bool empty,
|
||||
}
|
||||
|
||||
callback(dialog->hasSeletedChannel());
|
||||
this->selectChannelDialog_ = nullptr;
|
||||
});
|
||||
this->selectChannelDialog_ = dialog;
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/Channel.hpp"
|
||||
#include "common/NullablePtr.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/splits/SplitCommon.hpp"
|
||||
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
#include <QFont>
|
||||
#include <QPointer>
|
||||
#include <QShortcut>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
@@ -155,7 +155,7 @@ private:
|
||||
SplitInput *const input_;
|
||||
SplitOverlay *const overlay_;
|
||||
|
||||
NullablePtr<SelectChannelDialog> selectChannelDialog_;
|
||||
QPointer<SelectChannelDialog> selectChannelDialog_;
|
||||
|
||||
pajlada::Signals::Connection channelIDChangedConnection_;
|
||||
pajlada::Signals::Connection usermodeChangedConnection_;
|
||||
|
||||
Reference in New Issue
Block a user