Removed obsolete code.

This commit is contained in:
Gres 2015-09-30 21:28:00 +03:00
parent 3e499b86c5
commit 77757ff3c6
2 changed files with 7 additions and 17 deletions

View File

@ -10,7 +10,7 @@
ResultDialog::ResultDialog (const LanguageHelper &dictionary, QWidget *parent) : ResultDialog::ResultDialog (const LanguageHelper &dictionary, QWidget *parent) :
QDialog (parent), QDialog (parent),
ui (new Ui::ResultDialog), ui (new Ui::ResultDialog),
dictionary_ (dictionary), isShowAtCapturePos_ (true), dictionary_ (dictionary),
contextMenu_ (NULL), recognizeSubMenu_ (NULL), translateSubMenu_ (NULL), contextMenu_ (NULL), recognizeSubMenu_ (NULL), translateSubMenu_ (NULL),
clipboardAction_ (NULL) { clipboardAction_ (NULL) {
ui->setupUi (this); ui->setupUi (this);
@ -88,7 +88,6 @@ void ResultDialog::showResult (ProcessingItem item) {
QDesktopWidget *desktop = QApplication::desktop (); QDesktopWidget *desktop = QApplication::desktop ();
Q_CHECK_PTR (desktop); Q_CHECK_PTR (desktop);
if (isShowAtCapturePos_) {
QPoint correction = QPoint (ui->frame->lineWidth (), ui->frame->lineWidth ()); QPoint correction = QPoint (ui->frame->lineWidth (), ui->frame->lineWidth ());
move (item.screenPos - correction); move (item.screenPos - correction);
QRect screenRect = desktop->screenGeometry (this); QRect screenRect = desktop->screenGeometry (this);
@ -96,13 +95,5 @@ void ResultDialog::showResult (ProcessingItem item) {
if (y () > minY) { if (y () > minY) {
move (x (), minY); move (x (), minY);
} }
}
else {
QRect screenRect = desktop->availableGeometry (this);
ST_ASSERT (screenRect.isValid ());
QPoint newPos (screenRect.width () - width (), screenRect.height () - height ());
move (newPos);
}
activateWindow (); activateWindow ();
} }

View File

@ -37,7 +37,6 @@ class ResultDialog : public QDialog {
private: private:
Ui::ResultDialog *ui; Ui::ResultDialog *ui;
const LanguageHelper &dictionary_; const LanguageHelper &dictionary_;
bool isShowAtCapturePos_;
QMenu *contextMenu_; QMenu *contextMenu_;
QMenu *recognizeSubMenu_; QMenu *recognizeSubMenu_;
QMenu *translateSubMenu_; QMenu *translateSubMenu_;