Remove unneeded variable

This commit is contained in:
Gres 2020-03-28 14:35:56 +03:00
parent 9e72e67ee7
commit c9b2677bec
3 changed files with 4 additions and 6 deletions

View File

@ -11,9 +11,8 @@
#include <QPushButton>
CaptureAreaEditor::CaptureAreaEditor(const CommonModels &models,
CaptureAreaSelector &selector)
: QWidget(&selector)
, selector_(selector)
QWidget *parent)
: QWidget(parent)
, doTranslation_(new QCheckBox(tr("Translate:"), this))
, sourceLanguage_(new QComboBox(this))
, targetLanguage_(new QComboBox(this))

View File

@ -12,7 +12,7 @@ class CaptureAreaEditor : public QWidget
Q_OBJECT
public:
explicit CaptureAreaEditor(const CommonModels& models,
CaptureAreaSelector& selector);
QWidget* parent = nullptr);
~CaptureAreaEditor();
void set(const CaptureArea& area);
@ -21,7 +21,6 @@ public:
private:
void swapLanguages();
CaptureAreaSelector& selector_;
QCheckBox* doTranslation_;
QComboBox* sourceLanguage_;
QComboBox* targetLanguage_;

View File

@ -17,7 +17,7 @@ CaptureAreaSelector::CaptureAreaSelector(Capturer &capturer,
: capturer_(capturer)
, settings_(settings)
, pixmap_(pixmap)
, editor_(std::make_unique<CaptureAreaEditor>(models, *this))
, editor_(std::make_unique<CaptureAreaEditor>(models, this))
{
setWindowFlags(Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint |
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);