Settings should be a pointer because we might need to connect signals
from Settings to a MainWindow slot.
//create UI refresh timer
refreshTimer( this ),
//create a QGraphicsScene for the little chip icon
//create UI refresh timer
refreshTimer( this ),
//create a QGraphicsScene for the little chip icon
- scene( this ),
- //the settings widget
- settings(this)
{
//this is a stacked window on Maemo 5
#if defined(Q_WS_MAEMO_5)
{
//this is a stacked window on Maemo 5
#if defined(Q_WS_MAEMO_5)
helpWindow.setWindowFlags( windowFlags() | Qt::Window );
//Settings widget
helpWindow.setWindowFlags( windowFlags() | Qt::Window );
//Settings widget
+ settings = new Settings;
+ settings->hide();
//show errors about the sudo setup only once
showSudoError = true;
//show errors about the sudo setup only once
showSudoError = true;
MainWindow::~MainWindow()
{
MainWindow::~MainWindow()
{
//check for overclocking
#if defined(Q_WS_MAEMO_5)
//check for overclocking
#if defined(Q_WS_MAEMO_5)
- if (!settings.useOverclocking() && newmax > 600000) {
+ if (!settings->useOverclocking() && newmax > 600000) {
QMaemo5InformationBox::information(this, tr( "You need to enable overclocking in QCPUFreq's settings in order to set frequencies above 600MHz!"), 0);
refresh();
return;
QMaemo5InformationBox::information(this, tr( "You need to enable overclocking in QCPUFreq's settings in order to set frequencies above 600MHz!"), 0);
refresh();
return;
void MainWindow::setAutoRotation()
{
#if defined(Q_WS_MAEMO_5)
void MainWindow::setAutoRotation()
{
#if defined(Q_WS_MAEMO_5)
- setAttribute(Qt::WA_Maemo5AutoOrientation, settings.useAutoRotate());
+ setAttribute(Qt::WA_Maemo5AutoOrientation, settings->useAutoRotate());
*/
void MainWindow::showSettings()
{
*/
void MainWindow::showSettings()
{
- settings.reset();
- settings.show();
+ settings->reset();
+ settings->show();
//! the QGraphicsScene will contain the large chip icon displayed in the UI
QGraphicsScene scene;
bool showSudoError;
//! the QGraphicsScene will contain the large chip icon displayed in the UI
QGraphicsScene scene;
bool showSudoError;