• Tomaz Canabrava's avatar
    Fix opening DockWidget views · 0fcc718d
    Tomaz Canabrava authored
    The dock widget opening system had several issues,
    1 - it didn't deal with translations
    2 - it didn't deal with accelerator keys
    3 - it crashed if passed a invalid string (like when using KDE, happened
    for all options)
    
    This new way of using the views are slightly different:
    1 - no more string comparissons, use integer comparissons (much faster)
    2 - do not use a convoluted if/else - switch simplify.
    3 - do not create two different static variable strings for the same stuff
    4 - create an enum / an vector of strings (the enums bein an index of it)
    to acess the correct view.
    
    The overall code is clear than the old one, and faster.
    the only point where the code isn't as clear is on the call to
    showDockWidgetAction, since we passed a string that had the
    name of the Widget, but now the action only holds the index
    for the name in the string vector, I first need to get the
    correct string and send it.
    
    Tested here closing and reopening the app and verifying that
    the dock widgets that where left open are still open when
    reopening the application.
    Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
    0fcc718d
Name
Last commit
Last update
android Loading commit data...
debian Loading commit data...
deploy Loading commit data...
doc Loading commit data...
flightgear Loading commit data...
ios Loading commit data...
libs Loading commit data...
resources Loading commit data...
src Loading commit data...
test Loading commit data...
tools Loading commit data...
.appveyor.yml Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
.ycm_extra_conf.py Loading commit data...
CodingStyle.cc Loading commit data...
CodingStyle.h Loading commit data...
CodingStyle.qml Loading commit data...
Custom-Info.plist Loading commit data...
QGCApplication.pro Loading commit data...
QGCCommon.pri Loading commit data...
QGCExternalLibs.pri Loading commit data...
QGCInstaller.pri Loading commit data...
QGCLocationPlugin.pro Loading commit data...
QGCSetup.pri Loading commit data...
README.md Loading commit data...
android_environment.sh Loading commit data...
demo-log.txt Loading commit data...
license.txt Loading commit data...
qgcresources.qrc Loading commit data...
qgcvideo.pro Loading commit data...
qgroundcontrol.desktop Loading commit data...
qgroundcontrol.pro Loading commit data...
qgroundcontrol.qrc Loading commit data...
qgroundcontrol.rc Loading commit data...
testlog.txt Loading commit data...
testlog2.txt Loading commit data...