forked from qt-creator/qt-creator
		
	Merge remote-tracking branch 'origin/3.2' into HEAD
Change-Id: I257bb9310bb3bde493aff4cd43091ec63fcb5203
This commit is contained in:
		@@ -1973,9 +1973,10 @@ void EditorManager::updateMakeWritableWarning()
 | 
			
		||||
 | 
			
		||||
void EditorManager::setupSaveActions(IDocument *document, QAction *saveAction, QAction *saveAsAction, QAction *revertToSavedAction)
 | 
			
		||||
{
 | 
			
		||||
    saveAction->setEnabled(document != 0 && document->isModified());
 | 
			
		||||
    const bool hasFile = document != 0 && !document->filePath().isEmpty();
 | 
			
		||||
    saveAction->setEnabled(hasFile && document->isModified());
 | 
			
		||||
    saveAsAction->setEnabled(document != 0 && document->isSaveAsAllowed());
 | 
			
		||||
    revertToSavedAction->setEnabled(document != 0 && !document->filePath().isEmpty());
 | 
			
		||||
    revertToSavedAction->setEnabled(hasFile);
 | 
			
		||||
 | 
			
		||||
    const QString documentName = document ? document->displayName() : QString();
 | 
			
		||||
    QString quotedName;
 | 
			
		||||
 
 | 
			
		||||
@@ -318,12 +318,14 @@ void EditorToolBar::listContextMenu(QPoint pos)
 | 
			
		||||
                d->m_editorList->currentIndex());
 | 
			
		||||
    QString fileName = entry ? entry->fileName() : QString();
 | 
			
		||||
    QString shortFileName = entry ? QFileInfo(fileName).fileName() : QString();
 | 
			
		||||
    if (fileName.isEmpty() || shortFileName.isEmpty())
 | 
			
		||||
        return;
 | 
			
		||||
    QMenu menu;
 | 
			
		||||
    QAction *copyPath = menu.addAction(tr("Copy Full Path to Clipboard"));
 | 
			
		||||
    QAction *copyFileName = menu.addAction(tr("Copy File Name to Clipboard"));
 | 
			
		||||
    menu.addSeparator();
 | 
			
		||||
    if (fileName.isEmpty() || shortFileName.isEmpty()) {
 | 
			
		||||
        copyPath->setEnabled(false);
 | 
			
		||||
        copyFileName->setEnabled(false);
 | 
			
		||||
    }
 | 
			
		||||
    EditorManager::addSaveAndCloseEditorActions(&menu, entry);
 | 
			
		||||
    menu.addSeparator();
 | 
			
		||||
    EditorManager::addNativeDirAndOpenWithActions(&menu, entry);
 | 
			
		||||
 
 | 
			
		||||
@@ -241,6 +241,11 @@ bool MainWindow::isNewItemDialogRunning() const
 | 
			
		||||
 | 
			
		||||
MainWindow::~MainWindow()
 | 
			
		||||
{
 | 
			
		||||
    // explicitly delete window support, because that calls methods from ICore that call methods
 | 
			
		||||
    // from mainwindow, so mainwindow still needs to be alive
 | 
			
		||||
    delete m_windowSupport;
 | 
			
		||||
    m_windowSupport = 0;
 | 
			
		||||
 | 
			
		||||
    ExtensionSystem::PluginManager::removeObject(m_shortcutSettings);
 | 
			
		||||
    ExtensionSystem::PluginManager::removeObject(m_generalSettings);
 | 
			
		||||
    ExtensionSystem::PluginManager::removeObject(m_toolSettings);
 | 
			
		||||
@@ -371,11 +376,6 @@ void MainWindow::closeEvent(QCloseEvent *event)
 | 
			
		||||
    m_navigationWidget->closeSubWidgets();
 | 
			
		||||
 | 
			
		||||
    event->accept();
 | 
			
		||||
 | 
			
		||||
    // explicitly delete window support, because that calls methods from ICore that call methods
 | 
			
		||||
    // from mainwindow, so mainwindow still needs to be alive
 | 
			
		||||
    delete m_windowSupport;
 | 
			
		||||
    m_windowSupport = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::openDroppedFiles(const QStringList &files)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user