Hi,

I recently had a pretty hard time figuring out what was wrong with my app. When it started, instead of showing its main window it was invisible, so user was just presented the Belle home screen, but could not 'click' anything. Symbian task manager (long press on the home button) showed my app was running and was also showing a picture of home screen instead of application's main window. Moreover I couldn't kill the app from task manager, I always had to reboot the phone.

However, when I built the same code in Debug configuration, everything was working fine. That made it very difficult to find the problem.

I had to revert to previous revision and copy new lines in it step by step, rebuilding the app each time. The problem was the following:
Code:
class MainWindow: public QMainWindow
{
    Q_OBJECT

public:
	explicit MainWindow(QWidget *parent = 0);
	// some more declarations        

private:
	QLabel *databaseNameLabel;
	QLabel *label2;
	LEdit *lineEdit1;

	QString databasePath;
	int minQueryLength;

	void createMenus();
	void readSettings();
	void saveSettings() const;

private slots:
	void hints(QString query);
	void showAboutProgram();
	void updateSettings();
	// some more declarations
private:
	QString aboutProgram;
	QString license;
};
After moving the declarations of aboutProgram and license to the first private block, everything is working fine:
Code:
class MainWindow: public QMainWindow
{
    Q_OBJECT

public:
	explicit MainWindow(QWidget *parent = 0);
	// some more declarations        

private:
	QLabel *databaseNameLabel;
	QLabel *label2;
	LEdit *lineEdit1;

	QString databasePath;
	int minQueryLength;
	QString aboutProgram;
	QString license;

	void createMenus();
	void readSettings();
	void saveSettings() const;

private slots:
	void hints(QString query);
	void showAboutProgram();
	void updateSettings();
	// some more declarations

};
I was under the impression that you can state access specifiers as many times as you like in a C++ class (i. e. make as many blocks as you like). At least in "normal" C++ this should work. Is this a bug in Qt SDK or Symbian toolchain?

If you cannot put class member declarations in multiple blocks, you should get build error, not a runtime error, which is so difficult to find. Isn't that right?