GUI: In Windows platforms default to Win32 ANSI.

When running in Windows platforms, set the GUI's checked platform
initially to Windows 32-bit ANSI. Other platforms are set
initially to default/unspecified which means the type sizes are
from the platform GUI was compiled on.

This was suggested by Rober in ticket #3119.
This commit is contained in:
Kimmo Varis 2011-10-02 23:45:11 +03:00
parent 56f6204cf7
commit dbef9b34b1
1 changed files with 8 additions and 2 deletions

View File

@ -164,10 +164,16 @@ MainWindow::MainWindow() :
connect(act, SIGNAL(triggered()), this, SLOT(SelectPlatform())); connect(act, SIGNAL(triggered()), this, SLOT(SelectPlatform()));
} }
// Set the "default" as selected initially // For Windows platforms default to Win32 checked platform.
// For other platforms default to unspecified/default which means the
// platform Cppcheck GUI was compiled on.
#if defined(_WIN32)
Platform &plat = mPlatforms.get(Settings::Win32A);
#else
Platform &plat = mPlatforms.get(Settings::Unspecified); Platform &plat = mPlatforms.get(Settings::Unspecified);
#endif
plat.mActMainWindow->setChecked(true); plat.mActMainWindow->setChecked(true);
mSettings->setValue(SETTINGS_CHECKED_PLATFORM, Settings::Unspecified); mSettings->setValue(SETTINGS_CHECKED_PLATFORM, plat.mType);
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()