TRACE;\r
qDebug() << "icon" << iconName << "text" << text;\r
QAction *action;\r
-#ifndef Q_OS_SYMBIAN\r
- Q_UNUSED(important);\r
- action = toolBar->addAction(QIcon(Platform::instance()->icon(iconName)),\r
- text, receiver, member);\r
-#else\r
- if (!toolBar && important) {\r
- // Create tool bar if needed\r
- toolBar = new QToolBar("", this);\r
- // toolBar->setFixedHeight(63);\r
- toolBar->setStyleSheet("margin:0; border:0; padding:0");\r
- toolBar->setSizePolicy(QSizePolicy::MinimumExpanding,\r
- QSizePolicy::Maximum);\r
- addToolBar(Qt::BottomToolBarArea, toolBar);\r
- }\r
+#ifdef Q_OS_SYMBIAN\r
if (important) {\r
+ if (!toolBar) {\r
+ // Create tool bar if needed\r
+ toolBar = new QToolBar("", this);\r
+ toolBar->setStyleSheet("margin:0; border:0; padding:0");\r
+ addToolBar(Qt::BottomToolBarArea, toolBar);\r
+ }\r
// Add tool bar action\r
QPushButton *button = new QPushButton(this);\r
button->setIconSize(QSize(60, 60));\r
toolBar->addWidget(button);\r
}\r
// Add menu action, too\r
- action = new QAction(text, this);\r
- menuBar()->addAction(action);\r
+ action = menuBar()->addAction(text);\r
connect(action, SIGNAL(triggered()), receiver, member);\r
+#else\r
+ Q_UNUSED(important);\r
+ action = toolBar->addAction(QIcon(Platform::instance()->icon(iconName)),\r
+ text, receiver, member);\r
#endif\r
\r
- action->setText("");\r
action->setToolTip("");\r
-\r
return action;\r
}\r
\r