forked from qt-creator/qt-creator
		
	Core: Refactor handling of "window state" actions out of MainWindow
Currently the actions for fullscreen, minimize and zoom only apply to the main window, even if a different window is active. Refactor the handling of these actions into a WindowSupport class, and use that instead for the main window. In a second step, this will be used to add the functionality to the corresponding external windows (e.g. help and editor windows) Change-Id: Ief2c880f40948c3bb724196d6e0cfe888b8ece89 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
		@@ -28,6 +28,7 @@
 | 
			
		||||
****************************************************************************/
 | 
			
		||||
 | 
			
		||||
#include "icore.h"
 | 
			
		||||
#include "windowsupport.h"
 | 
			
		||||
 | 
			
		||||
#include <app/app_version.h>
 | 
			
		||||
#include <extensionsystem/pluginmanager.h>
 | 
			
		||||
@@ -523,6 +524,11 @@ void ICore::removeContextObject(IContext *context)
 | 
			
		||||
    m_mainwindow->removeContextObject(context);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ICore::registerWindow(QWidget *window, const Context &context)
 | 
			
		||||
{
 | 
			
		||||
    new WindowSupport(window, context); // deletes itself when widget is destroyed
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ICore::openFiles(const QStringList &arguments, ICore::OpenFilesFlags flags)
 | 
			
		||||
{
 | 
			
		||||
    m_mainwindow->openFiles(arguments, flags);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user