forked from qt-creator/qt-creator
Move displayName from IEditor to IDocument
The display name is not editor instance specific, but belongs to the document. Change-Id: I3c936f04a86e10e6ca30063d85036d85b4b5880e Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -92,8 +92,6 @@ ImageViewer::ImageViewer(QWidget *parent)
|
||||
d->ui_toolbar.toolButtonPlayPause->setCommandId(Constants::ACTION_TOGGLE_ANIMATION);
|
||||
|
||||
// connections
|
||||
connect(d->file, SIGNAL(changed()), this, SIGNAL(changed()));
|
||||
|
||||
connect(d->ui_toolbar.toolButtonZoomIn, SIGNAL(clicked()),
|
||||
d->imageView, SLOT(zoomIn()));
|
||||
connect(d->ui_toolbar.toolButtonZoomOut, SIGNAL(clicked()),
|
||||
@@ -133,12 +131,10 @@ bool ImageViewer::open(QString *errorString, const QString &fileName, const QStr
|
||||
*errorString = tr("Cannot open image file %1.").arg(QDir::toNativeSeparators(realFileName));
|
||||
return false;
|
||||
}
|
||||
setDisplayName(QFileInfo(fileName).fileName());
|
||||
d->file->setFilePath(fileName);
|
||||
d->ui_toolbar.toolButtonPlayPause->setVisible(d->imageView->isAnimated());
|
||||
setPaused(!d->imageView->isAnimated());
|
||||
// d_ptr->file->setMimeType
|
||||
emit changed();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -152,17 +148,6 @@ Core::Id ImageViewer::id() const
|
||||
return Core::Id(Constants::IMAGEVIEWER_ID);
|
||||
}
|
||||
|
||||
QString ImageViewer::displayName() const
|
||||
{
|
||||
return d->displayName;
|
||||
}
|
||||
|
||||
void ImageViewer::setDisplayName(const QString &title)
|
||||
{
|
||||
d->displayName = title;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
bool ImageViewer::isTemporary() const
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user