[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kdelirc
From: Michael Zanetti <michael_zanetti () gmx ! net>
Date: 2010-03-01 19:09:28
Message-ID: 1267470568.369068.27172.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1097613 by mzanetti:
removed most compiler warnings. not all though
M +4 -2 kcmremotecontrol/editactioncontainer.cpp
M +8 -8 kcmremotecontrol/modedialog.cpp
M +2 -2 kcmremotecontrol/modedialog.h
M +1 -0 kcmremotecontrol/model.cpp
M +0 -10 libkremotecontrol/action.cpp
M +3 -6 libkremotecontrol/action.h
M +0 -21 libkremotecontrol/dbusaction.cpp
M +1 -4 libkremotecontrol/dbusaction.h
M +1 -1 libkremotecontrol/profile.cpp
M +1 -1 libkremotecontrol/profile.h
M +0 -12 libkremotecontrol/profileaction.cpp
M +1 -4 libkremotecontrol/profileaction.h
M +2 -2 libkremotecontrol/profileserver.cpp
M +5 -2 libkremotecontrol/remote.cpp
--- branches/work/kdelirc/kcmremotecontrol/editactioncontainer.cpp #1097612:1097613
@@ -130,14 +130,16 @@
case Action::DBusAction:{
EditDBusAction *dbusActionEditor = \
dynamic_cast<EditDBusAction*>(m_innerWidget); if(dbusActionEditor){
- ExecutionEngine::executeAction(&dbusActionEditor->action());
+ DBusAction action = dbusActionEditor->action();
+ ExecutionEngine::executeAction(&action);
}
break;
}
case Action::ProfileAction:{
EditProfileAction *profileActionEditor = \
dynamic_cast<EditProfileAction*>(m_innerWidget); if(profileActionEditor){
- ExecutionEngine::executeAction(&profileActionEditor->action());
+ ProfileAction action = profileActionEditor->action();
+ ExecutionEngine::executeAction(&action);
}
break;
}
--- branches/work/kdelirc/kcmremotecontrol/modedialog.cpp #1097612:1097613
@@ -81,8 +81,8 @@
}
connect(ui.leName, SIGNAL(textChanged(const QString&)), this, \
SLOT(checkForComplete()));
- connect(ui.cbButtonForward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(forwardButtonChanged(int)));
- connect(ui.cbButtonBackward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(backwardButtonChanged(int))); + connect(ui.cbButtonForward, \
SIGNAL(currentIndexChanged(int)), this, SLOT(forwardButtonChanged())); + \
connect(ui.cbButtonBackward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(backwardButtonChanged())); checkForComplete();
// Pause remote to make use of button presses here
@@ -145,8 +145,8 @@
KDialog::slotButtonClicked(button);
}
-void ModeDialog::forwardButtonChanged(int index) {
- disconnect(ui.cbButtonBackward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(backwardButtonChanged(int))); +void ModeDialog::forwardButtonChanged() {
+ disconnect(ui.cbButtonBackward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(backwardButtonChanged())); ui.cbButtonBackward->clear();
ui.cbButtonBackward->addItem(i18n("No Button"), "");
@@ -155,11 +155,11 @@
}
ui.cbButtonBackward->setCurrentIndex(ui.cbButtonBackward->findData(m_remote->previousModeButton()));
- connect(ui.cbButtonBackward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(backwardButtonChanged(int))); + connect(ui.cbButtonBackward, \
SIGNAL(currentIndexChanged(int)), this, SLOT(backwardButtonChanged())); }
-void ModeDialog::backwardButtonChanged(int index) {
- disconnect(ui.cbButtonForward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(forwardButtonChanged(int))); +void ModeDialog::backwardButtonChanged() {
+ disconnect(ui.cbButtonForward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(forwardButtonChanged())); ui.cbButtonForward->clear();
ui.cbButtonForward->addItem(i18n("No Button"), "");
@@ -168,7 +168,7 @@
}
ui.cbButtonForward->setCurrentIndex(ui.cbButtonForward->findData(m_remote->nextModeButton()));
- connect(ui.cbButtonForward, SIGNAL(currentIndexChanged(int)), this, \
SLOT(forwardButtonChanged(int))); + connect(ui.cbButtonForward, \
SIGNAL(currentIndexChanged(int)), this, SLOT(forwardButtonChanged())); }
void ModeDialog::buttonPressed(const Solid::Control::RemoteControlButton& button) {
--- branches/work/kdelirc/kcmremotecontrol/modedialog.h #1097612:1097613
@@ -52,8 +52,8 @@
private slots:
void checkForComplete();
void slotButtonClicked(int button);
- void forwardButtonChanged(int index);
- void backwardButtonChanged(int index);
+ void forwardButtonChanged();
+ void backwardButtonChanged();
void buttonPressed(const Solid::Control::RemoteControlButton &button);
};
--- branches/work/kdelirc/kcmremotecontrol/model.cpp #1097612:1097613
@@ -687,6 +687,7 @@
}
bool RemoteModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int \
row, int column, const QModelIndex &parent) { + Q_UNUSED(row)
if (!data->hasFormat("kremotecontrol/action"))
return false;
--- branches/work/kdelirc/libkremotecontrol/action.cpp #1097612:1097613
@@ -42,16 +42,6 @@
m_button = button;
}
-void Action::operator=(const Action& action) {
- m_type = action.type();
- m_button = action.button();
-}
-
-bool Action::operator==(const Action& action) const {
- return m_type == action.type() &&
- m_button == action.button();
-}
-
void Action::saveToConfig(KConfigGroup& config) {
config.writeEntry("Type", (int)m_type);
config.writeEntry("Button", m_button);
--- branches/work/kdelirc/libkremotecontrol/action.h #1097612:1097613
@@ -32,7 +32,7 @@
Q_OBJECT
public:
- enum ActionType {ModeSwitchAction, DBusAction, ProfileAction};
+ enum ActionType {DBusAction, ProfileAction};
Action(ActionType type, const QString &button);
Action(ActionType type);
@@ -42,13 +42,10 @@
QString button() const;
void setButton(const QString &button);
-
- virtual void operator=(const Action &action);
- virtual bool operator==(const Action &action) const;
-
+
virtual QString name() const = 0;
virtual QString description() const = 0;
-
+
virtual void saveToConfig(KConfigGroup &config);
virtual void loadFromConfig(const KConfigGroup &config);
--- branches/work/kdelirc/libkremotecontrol/dbusaction.cpp #1097612:1097613
@@ -74,27 +74,6 @@
m_destination = destination;
}
-void DBusAction::operator=(const DBusAction& action) {
- m_type = action.type();
- m_button = action.button();
- m_application = action.application();
- m_function = action.function();
- m_destination = action.destination();
- m_autostart = action.autostart();
- m_repeat = action.repeat();
-}
-
-bool DBusAction::operator==(const DBusAction& action) const {
- return m_type == action.type() &&
- m_application == action.application() &&
- m_autostart == action.autostart() &&
- m_repeat == action.repeat() &&
- m_destination == action.destination() &&
- m_function == action.function() &&
- m_node == action.node() &&
- m_button == action.button();
-}
-
QString DBusAction::name() const {
return m_application + ":" + m_node;
}
--- branches/work/kdelirc/libkremotecontrol/dbusaction.h #1097612:1097613
@@ -54,10 +54,7 @@
ActionDestination destination() const;
void setDestination(ActionDestination destination);
-
- virtual void operator=(const DBusAction &action);
- virtual bool operator==(const DBusAction &action) const;
-
+
virtual QString name() const;
virtual QString description() const;
--- branches/work/kdelirc/libkremotecontrol/profile.cpp #1097612:1097613
@@ -108,7 +108,7 @@
return m_version == other->version();
}
-const int Profile::ProfileVersion::operator==(const Profile::ProfileVersion& other) \
const { +int Profile::ProfileVersion::operator==(const Profile::ProfileVersion& \
other) const { if(m_major == other.m_major){
if(m_minor > other.m_minor){
return 1;
--- branches/work/kdelirc/libkremotecontrol/profile.h #1097612:1097613
@@ -42,7 +42,7 @@
};
ProfileVersion(const QString &version);
- const int operator==(const ProfileVersion &other) const;
+ int operator==(const ProfileVersion &other) const;
QString toString() const;
};
--- branches/work/kdelirc/libkremotecontrol/profileaction.cpp #1097612:1097613
@@ -48,18 +48,6 @@
m_template = actionTemplateId;
}
-void ProfileAction::operator=(const ProfileAction& action) {
- DBusAction::operator=(action);
- m_profileId = action.profileId();
- m_template = action.actionTemplateId();
-}
-
-bool ProfileAction::operator==(const ProfileAction& other) const {
- return DBusAction::operator==(other) &&
- m_profileId == other.profileId() &&
- m_template == other.actionTemplateId();
-}
-
QString ProfileAction::name() const {
foreach(const Profile *profile, ProfileServer::allProfiles()){
if(profile->profileId() == m_profileId){
--- branches/work/kdelirc/libkremotecontrol/profileaction.h #1097612:1097613
@@ -34,10 +34,7 @@
QString actionTemplateId() const;
void setActionTemplateId(const QString &actionTemplateID);
-
- virtual void operator=(const ProfileAction &action);
- virtual bool operator==(const ProfileAction &other) const;
-
+
virtual QString name() const;
virtual QString description() const;
--- branches/work/kdelirc/libkremotecontrol/profileserver.cpp #1097612:1097613
@@ -223,8 +223,8 @@
ProfileActionTemplate ProfileServer::ProfileXmlContentHandler::parseAction(QDomNode \
actionNode, const QString& profileId) { QString buttonName;
- bool autostart = false;
- bool repeat;
+ bool autostart = true;
+ bool repeat = false;
QString actionId = \
actionNode.attributes().namedItem("id").nodeValue().trimmed(); if \
(actionNode.attributes().contains("button")){
buttonName = \
actionNode.attributes().namedItem("button").nodeValue().trimmed();
--- branches/work/kdelirc/libkremotecontrol/remote.cpp #1097612:1097613
@@ -28,12 +28,15 @@
ModeChangeHandler(Remote *remote) {
m_remote = remote;
}
+ virtual ~ModeChangeHandler(){}
virtual bool handleModeButton(const QString &button) = 0;
virtual Remote::ModeChangeMode type() const = 0;
virtual QStringList availableModeSwitchButtons() const = 0;
virtual void addMode(Mode *mode) const = 0;
- virtual void handleModeButtonAssignment(const QString &button){};
+ virtual void handleModeButtonAssignment(const QString &button){
+ Q_UNUSED(button);
+ };
virtual void handleModeButtonAssignments(){};
protected:
@@ -70,7 +73,7 @@
int index= currentModeHasButton ? \
m_remote->m_modeList.indexOf(m_remote->currentMode()) +1 : 0;
- for (index; index < size ; ++index) {
+ for(; index < size ; ++index) {
if (m_remote->m_modeList.at(index)->button() == button) {
m_remote->setCurrentMode(m_remote->m_modeList.at(index));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic