summaryrefslogtreecommitdiff
path: root/tizen/src/ui/menu
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2016-07-02 15:07:15 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2016-07-05 18:43:22 +0900
commita9e6051745ab94ba54a0222e3c16b77787de5369 (patch)
tree746b8afe3ddc3984a0f51a13b0034682f6af3ac1 /tizen/src/ui/menu
parentf998ca30b51b5c549898763d4bd5041380a60416 (diff)
downloadqemu-a9e6051745ab94ba54a0222e3c16b77787de5369.tar.gz
qemu-a9e6051745ab94ba54a0222e3c16b77787de5369.tar.bz2
qemu-a9e6051745ab94ba54a0222e3c16b77787de5369.zip
package: make it buildable on Windows and MacOSX
VIRTFS is disabled temporarily. It is work again soon. Change-Id: Ifa8ced8577e78c1cea8dbf314aedb4b33bfb2528 Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com> Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
Diffstat (limited to 'tizen/src/ui/menu')
-rw-r--r--tizen/src/ui/menu/contextmenu.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp
index ce681217f6..0fbfdb558e 100644
--- a/tizen/src/ui/menu/contextmenu.cpp
+++ b/tizen/src/ui/menu/contextmenu.cpp
@@ -45,12 +45,16 @@ void qemu_system_reset_request(void);
#define MENU_ACTION_REBOOT 1
void send_shutdown_request(int action);
+#define QObject qemu_QObject
#include "util/net_helper.h"
#include "util/osutil.h"
#include "util/device_hotplug.h"
#include "util/ui_operations.h"
+#undef QObject
}
+#undef connect
+
ContextMenu::ContextMenu(QWidget *parent) : QMenu(parent)
{
this->parent = (MainWindow *)parent;
@@ -89,7 +93,7 @@ ContextMenu::ContextMenu(QWidget *parent) : QMenu(parent)
rebootTimer = new QTimer(this);
rebootTimer->setInterval(HARDWARE_REBOOT_INTERVAL);
rebootTimer->setSingleShot(true);
- connect(rebootTimer, SIGNAL(timeout()), this, SLOT(slotDeviceReset()));
+ QObject::connect(rebootTimer, SIGNAL(timeout()), this, SLOT(slotDeviceReset()));
createItems(this, this->parent->getUiInfo()->getMenuList());
@@ -230,7 +234,7 @@ void ContextMenu::createOnTopItem(QMenu *menu, MenuItem *item)
actionOnTop->setIcon(QIcon(QPixmap(":/icons/alwaysontop.png")));
#endif
actionOnTop->setCheckable(true);
- connect(actionOnTop, SIGNAL(triggered(bool)), this, SLOT(slotOnTop(bool)));
+ QObject::connect(actionOnTop, SIGNAL(triggered(bool)), this, SLOT(slotOnTop(bool)));
/* shortcut */
if (item->getShortcuts().isEmpty() == false) {
@@ -252,7 +256,7 @@ void ContextMenu::createMoveItem(QMenu *menu, MenuItem *item)
actionMove = menu->addAction(
menuName.isEmpty() ? MENU_MOVE_ITEM_TEXT : menuName);
actionMove->setIcon(QIcon(QPixmap(":/icons/move.png")));
- connect(actionMove, SIGNAL(triggered()), this, SLOT(slotMove()));
+ QObject::connect(actionMove, SIGNAL(triggered()), this, SLOT(slotMove()));
/* shortcut */
if (item->getShortcuts().isEmpty() == false) {
@@ -279,7 +283,7 @@ void ContextMenu::createSwitchItem(QMenu *menu, MenuItem *item)
switchGroup = new QActionGroup(this);
switchMapper = new QSignalMapper(this);
- connect(switchMapper, SIGNAL(mapped(int)), this, SLOT(slotSwitch(int)));
+ QObject::connect(switchMapper, SIGNAL(mapped(int)), this, SLOT(slotSwitch(int)));
/* shortcuts */
QAction *switchAction = switchMenu->menuAction();
@@ -309,7 +313,7 @@ void ContextMenu::createSwitchItem(QMenu *menu, MenuItem *item)
action->setActionGroup(switchGroup);
action->setCheckable(true);
switchMapper->setMapping(action, i);
- connect(action, SIGNAL(triggered()), switchMapper, SLOT(map()));
+ QObject::connect(action, SIGNAL(triggered()), switchMapper, SLOT(map()));
}
action = (QAction *) switchMapper->mapping(
@@ -337,7 +341,7 @@ void ContextMenu::createScaleItem(QMenu *menu, MenuItem *item)
scaleGroup = new QActionGroup(this);
scaleMapper = new QSignalMapper(this);
- connect(scaleMapper, SIGNAL(mapped(int)), this, SLOT(slotScale(int)));
+ QObject::connect(scaleMapper, SIGNAL(mapped(int)), this, SLOT(slotScale(int)));
/* shortcuts */
QAction *scaleAction = scaleMenu->menuAction();
@@ -374,7 +378,7 @@ void ContextMenu::createScaleItem(QMenu *menu, MenuItem *item)
action->setActionGroup(scaleGroup);
action->setCheckable(true);
scaleMapper->setMapping(action, factorIter.key());
- connect(action, SIGNAL(triggered()), scaleMapper, SLOT(map()));
+ QObject::connect(action, SIGNAL(triggered()), scaleMapper, SLOT(map()));
}
// TODO: interpolation
@@ -404,7 +408,7 @@ void ContextMenu::createControllerItem(QMenu *menu, MenuItem *item)
controllerGroup = new QActionGroup(this);
controllerMapper = new QSignalMapper(this);
- connect(controllerMapper, SIGNAL(mapped(int)), this, SLOT(slotController(int)));
+ QObject::connect(controllerMapper, SIGNAL(mapped(int)), this, SLOT(slotController(int)));
/* shortcuts */
QAction *conAction = controllerMenu->menuAction();
@@ -433,14 +437,14 @@ void ContextMenu::createControllerItem(QMenu *menu, MenuItem *item)
action->setActionGroup(controllerGroup);
action->setCheckable(true);
action->setChecked(true);
- connect(action, SIGNAL(triggered()), this, SLOT(slotCloseCon()));
+ QObject::connect(action, SIGNAL(triggered()), this, SLOT(slotCloseCon()));
for (int i = 0; i < conFormList.count(); i++) {
action = controllerMenu->addAction(conFormList.at(i)->getName());
action->setActionGroup(controllerGroup);
action->setCheckable(true);
controllerMapper->setMapping(action, i);
- connect(action, SIGNAL(triggered()), controllerMapper, SLOT(map()));
+ QObject::connect(action, SIGNAL(triggered()), controllerMapper, SLOT(map()));
}
} else {
qWarning("cannot create a controllerItem");
@@ -463,7 +467,7 @@ void ContextMenu::createHostKeyboardItem(QMenu *menu, MenuItem *item)
QAction *hostKbdAction = keyboardMenu->addAction(MENU_ON_ITEM_TEXT);
hostKbdAction->setActionGroup(keyboardGroup);
hostKbdAction->setCheckable(true);
- connect(hostKbdAction, SIGNAL(toggled(bool)), this, SLOT(slotHostKeyboard(bool)));
+ QObject::connect(hostKbdAction, SIGNAL(toggled(bool)), this, SLOT(slotHostKeyboard(bool)));
/* shortcuts */
// TODO:
@@ -600,7 +604,7 @@ QAction *ContextMenu::addGeneralAction(QMenu *menu,
{
QAction *action = menu->addAction(text);
action->setIcon(icon);
- connect(action, SIGNAL(triggered()), this, slot);
+ QObject::connect(action, SIGNAL(triggered()), this, slot);
attachShortcut(action, shortcut, slot);
@@ -611,8 +615,8 @@ void ContextMenu::attachShortcut(
QAction *action, QShortcut *shortcut, const char *slot)
{
if (action != NULL && shortcut != NULL) {
- connect(shortcut, SIGNAL(activated()), this, slot);
- connect(shortcut, SIGNAL(activatedAmbiguously()),
+ QObject::connect(shortcut, SIGNAL(activated()), this, slot);
+ QObject::connect(shortcut, SIGNAL(activatedAmbiguously()),
this, SLOT(slotAmbiguousShortcut()));
action->setShortcut(shortcut->key());
@@ -1095,7 +1099,7 @@ void ContextMenu::slotClose()
longPressTimer->setInterval(CLOSE_POWER_KEY_INTERVAL);
longPressTimer->setSingleShot(true);
- connect(longPressTimer, SIGNAL(timeout()), this, SLOT(slotPwkeyRelease()));
+ QObject::connect(longPressTimer, SIGNAL(timeout()), this, SLOT(slotPwkeyRelease()));
longPressTimer->start();
}