Fix -Woverloaded-virtual clang warnings

c++11
scrawl 10 years ago
parent 141e9d36a4
commit e23775e338

@ -73,7 +73,7 @@ namespace MWGui
mPages.clear();
}
void BookWindow::open (MWWorld::Ptr book, bool showTakeButton)
void BookWindow::openBook (MWWorld::Ptr book, bool showTakeButton)
{
mBook = book;

@ -16,7 +16,7 @@ namespace MWGui
virtual void exit();
void open(MWWorld::Ptr book, bool showTakeButton);
void openBook(MWWorld::Ptr book, bool showTakeButton);
void setInventoryAllowed(bool allowed);
protected:

@ -84,7 +84,7 @@ void CompanionWindow::onItemSelected(int index)
if (count > 1 && !shift)
{
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
dialog->open(object.getClass().getName(object), "#{sTake}", count);
dialog->openCountDialog(object.getClass().getName(object), "#{sTake}", count);
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
}
@ -106,7 +106,7 @@ void CompanionWindow::onBackgroundSelected()
}
}
void CompanionWindow::open(const MWWorld::Ptr& npc)
void CompanionWindow::openCompanion(const MWWorld::Ptr& npc)
{
mPtr = npc;
updateEncumbranceBar();

@ -22,7 +22,7 @@ namespace MWGui
virtual void resetReference();
void open(const MWWorld::Ptr& npc);
void openCompanion(const MWWorld::Ptr& npc);
void onFrame ();
private:

@ -16,7 +16,7 @@ namespace MWGui
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ConfirmationDialog::onOkButtonClicked);
}
void ConfirmationDialog::open(const std::string& message, const std::string& confirmMessage, const std::string& cancelMessage)
void ConfirmationDialog::askForConfirmation(const std::string& message, const std::string& confirmMessage, const std::string& cancelMessage)
{
setVisible(true);

@ -9,7 +9,7 @@ namespace MWGui
{
public:
ConfirmationDialog();
void open(const std::string& message, const std::string& confirmMessage="#{sOk}", const std::string& cancelMessage="#{sCancel}");
void askForConfirmation(const std::string& message, const std::string& confirmMessage="#{sOk}", const std::string& cancelMessage="#{sCancel}");
virtual void exit();
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;

@ -83,7 +83,7 @@ namespace MWGui
if (count > 1 && !shift)
{
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
dialog->open(object.getClass().getName(object), "#{sTake}", count);
dialog->openCountDialog(object.getClass().getName(object), "#{sTake}", count);
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
}
@ -131,7 +131,7 @@ namespace MWGui
dropItem();
}
void ContainerWindow::open(const MWWorld::Ptr& container, bool loot)
void ContainerWindow::openContainer(const MWWorld::Ptr& container, bool loot)
{
mPickpocketDetected = false;
mPtr = container;

@ -33,7 +33,7 @@ namespace MWGui
public:
ContainerWindow(DragAndDrop* dragAndDrop);
void open(const MWWorld::Ptr& container, bool loot=false);
void openContainer(const MWWorld::Ptr& container, bool loot=false);
virtual void close();
virtual void resetReference();

@ -29,7 +29,7 @@ namespace MWGui
mItemEdit->eventEditSelectAccept += MyGUI::newDelegate(this, &CountDialog::onEnterKeyPressed);
}
void CountDialog::open(const std::string& item, const std::string& message, const int maxCount)
void CountDialog::openCountDialog(const std::string& item, const std::string& message, const int maxCount)
{
setVisible(true);

@ -14,7 +14,7 @@ namespace MWGui
{
public:
CountDialog();
void open(const std::string& item, const std::string& message, const int maxCount);
void openCountDialog(const std::string& item, const std::string& message, const int maxCount);
void cancel();
virtual void exit();

@ -237,7 +237,7 @@ namespace MWGui
{
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
std::string message = mTrading ? "#{sQuanityMenuMessage01}" : "#{sTake}";
dialog->open(object.getClass().getName(object), message, count);
dialog->openCountDialog(object.getClass().getName(object), message, count);
dialog->eventOkClicked.clear();
if (mTrading)
dialog->eventOkClicked += MyGUI::newDelegate(this, &InventoryWindow::sellItem);

@ -103,7 +103,7 @@ void ItemView::update()
MyGUI::Align::Stretch);
dragArea->setNeedMouseFocus(true);
dragArea->eventMouseButtonClick += MyGUI::newDelegate(this, &ItemView::onSelectedBackground);
dragArea->eventMouseWheel += MyGUI::newDelegate(this, &ItemView::onMouseWheel);
dragArea->eventMouseWheel += MyGUI::newDelegate(this, &ItemView::onMouseWheelMoved);
for (ItemModel::ModelIndex i=0; i<static_cast<int>(mModel->getItemCount()); ++i)
{
@ -122,7 +122,7 @@ void ItemView::update()
itemWidget->setCount(item.mCount);
itemWidget->eventMouseButtonClick += MyGUI::newDelegate(this, &ItemView::onSelectedItem);
itemWidget->eventMouseWheel += MyGUI::newDelegate(this, &ItemView::onMouseWheel);
itemWidget->eventMouseWheel += MyGUI::newDelegate(this, &ItemView::onMouseWheelMoved);
}
layoutWidgets();
@ -139,7 +139,7 @@ void ItemView::onSelectedBackground(MyGUI::Widget *sender)
eventBackgroundClicked();
}
void ItemView::onMouseWheel(MyGUI::Widget *_sender, int _rel)
void ItemView::onMouseWheelMoved(MyGUI::Widget *_sender, int _rel)
{
if (mScrollView->getViewOffset().left + _rel*0.3f > 0)
mScrollView->setViewOffset(MyGUI::IntPoint(0, 0));

@ -40,7 +40,7 @@ namespace MWGui
void onSelectedItem (MyGUI::Widget* sender);
void onSelectedBackground (MyGUI::Widget* sender);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
void onMouseWheelMoved(MyGUI::Widget* _sender, int _rel);
ItemModel* mModel;
MyGUI::ScrollView* mScrollView;

@ -112,7 +112,7 @@ namespace MWGui
else
{
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
dialog->open("#{sMessage2}");
dialog->askForConfirmation("#{sMessage2}");
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &MainMenu::onExitConfirmed);
dialog->eventCancelClicked.clear();
@ -125,7 +125,7 @@ namespace MWGui
else
{
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
dialog->open("#{sNotifyMessage54}");
dialog->askForConfirmation("#{sNotifyMessage54}");
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &MainMenu::onNewGameConfirmed);
dialog->eventCancelClicked.clear();

@ -650,7 +650,7 @@ namespace MWGui
void MapWindow::onNoteEditDelete()
{
ConfirmationDialog* confirmation = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
confirmation->open("#{sDeleteNote}", "#{sYes}", "#{sNo}");
confirmation->askForConfirmation("#{sDeleteNote}", "#{sYes}", "#{sNo}");
confirmation->eventCancelClicked.clear();
confirmation->eventOkClicked.clear();
confirmation->eventOkClicked += MyGUI::newDelegate(this, &MapWindow::onNoteEditDeleteConfirm);

@ -73,7 +73,7 @@ namespace MWGui
void SaveGameDialog::confirmDeleteSave()
{
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
dialog->open("#{sMessage3}");
dialog->askForConfirmation("#{sMessage3}");
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &SaveGameDialog::onDeleteSlotConfirmed);
dialog->eventCancelClicked.clear();
@ -232,7 +232,7 @@ namespace MWGui
if (mCurrentSlot != NULL && !reallySure)
{
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
dialog->open("#{sMessage4}");
dialog->askForConfirmation("#{sMessage4}");
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &SaveGameDialog::onConfirmationGiven);
dialog->eventCancelClicked.clear();

@ -48,7 +48,7 @@ namespace MWGui
center();
}
void ScrollWindow::open (MWWorld::Ptr scroll, bool showTakeButton)
void ScrollWindow::openScroll (MWWorld::Ptr scroll, bool showTakeButton)
{
// no 3d sounds because the object could be in a container.
MWBase::Environment::get().getSoundManager()->playSound ("scroll", 1.0, 1.0);

@ -17,7 +17,7 @@ namespace MWGui
public:
ScrollWindow ();
void open (MWWorld::Ptr scroll, bool showTakeButton);
void openScroll (MWWorld::Ptr scroll, bool showTakeButton);
virtual void exit();
void setInventoryAllowed(bool allowed);

@ -271,7 +271,7 @@ namespace MWGui
return;
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
dialog->open("#{sNotifyMessage67}");
dialog->askForConfirmation("#{sNotifyMessage67}");
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResolutionAccept);
dialog->eventCancelClicked.clear();
@ -540,7 +540,7 @@ namespace MWGui
void SettingsWindow::onResetDefaultBindings(MyGUI::Widget* _sender)
{
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
dialog->open("#{sNotifyMessage66}");
dialog->askForConfirmation("#{sNotifyMessage66}");
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResetDefaultBindingsAccept);
dialog->eventCancelClicked.clear();

@ -289,7 +289,7 @@ namespace MWGui
widget->setUserString(sSpellModelIndex, MyGUI::utility::toString(index));
widget->eventMouseWheel += MyGUI::newDelegate(this, &SpellView::onMouseWheel);
widget->eventMouseWheel += MyGUI::newDelegate(this, &SpellView::onMouseWheelMoved);
widget->eventMouseButtonClick += MyGUI::newDelegate(this, &SpellView::onSpellSelected);
}
@ -303,7 +303,7 @@ namespace MWGui
eventSpellClicked(getSpellModelIndex(_sender));
}
void SpellView::onMouseWheel(MyGUI::Widget* _sender, int _rel)
void SpellView::onMouseWheelMoved(MyGUI::Widget* _sender, int _rel)
{
if (mScrollView->getViewOffset().top + _rel*0.3f > 0)
mScrollView->setViewOffset(MyGUI::IntPoint(0, 0));

@ -84,7 +84,7 @@ namespace MWGui
void adjustSpellWidget(const Spell& spell, SpellModel::ModelIndex index, MyGUI::Widget* widget);
void onSpellSelected(MyGUI::Widget* _sender);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
void onMouseWheelMoved(MyGUI::Widget* _sender, int _rel);
SpellModel::ModelIndex getSpellModelIndex(MyGUI::Widget* _sender);

@ -134,7 +134,7 @@ namespace MWGui
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
std::string question = MWBase::Environment::get().getWindowManager()->getGameSettingString("sQuestionDeleteSpell", "Delete %s?");
question = boost::str(boost::format(question) % spell->mName);
dialog->open(question);
dialog->askForConfirmation(question);
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &SpellWindow::onDeleteSpellAccept);
dialog->eventCancelClicked.clear();

@ -194,7 +194,7 @@ namespace MWGui
{
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
std::string message = "#{sQuanityMenuMessage02}";
dialog->open(object.getClass().getName(object), message, count);
dialog->openCountDialog(object.getClass().getName(object), message, count);
dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &TradeWindow::sellItem);
mItemToSell = mSortModel->mapToSource(index);

@ -1524,7 +1524,7 @@ namespace MWGui
void WindowManager::showCompanionWindow(MWWorld::Ptr actor)
{
pushGuiMode(MWGui::GM_Companion);
mCompanionWindow->open(actor);
mCompanionWindow->openCompanion(actor);
}
void WindowManager::changePointer(const std::string &name)
@ -1927,19 +1927,19 @@ namespace MWGui
void WindowManager::openContainer(const MWWorld::Ptr &container, bool loot)
{
pushGuiMode(GM_Container);
mContainerWindow->open(container, loot);
mContainerWindow->openContainer(container, loot);
}
void WindowManager::showBook(const MWWorld::Ptr &item, bool showTakeButton)
{
pushGuiMode(GM_Book);
mBookWindow->open(item, showTakeButton);
mBookWindow->openBook(item, showTakeButton);
}
void WindowManager::showScroll(const MWWorld::Ptr &item, bool showTakeButton)
{
pushGuiMode(GM_Scroll);
mScrollWindow->open(item, showTakeButton);
mScrollWindow->openScroll(item, showTakeButton);
}
std::string WindowManager::correctIconPath(const std::string& path)

@ -70,7 +70,7 @@ namespace Gui
button->setCaption((*it));
button->getSubWidgetText()->setWordWrap(true);
button->getSubWidgetText()->setTextAlign(MyGUI::Align::Left);
button->eventMouseWheel += MyGUI::newDelegate(this, &MWList::onMouseWheel);
button->eventMouseWheel += MyGUI::newDelegate(this, &MWList::onMouseWheelMoved);
button->eventMouseButtonClick += MyGUI::newDelegate(this, &MWList::onItemSelected);
int height = button->getTextSize().height;
@ -135,7 +135,7 @@ namespace Gui
mItems.clear();
}
void MWList::onMouseWheel(MyGUI::Widget* _sender, int _rel)
void MWList::onMouseWheelMoved(MyGUI::Widget* _sender, int _rel)
{
//NB view offset is negative
if (mScrollView->getViewOffset().top + _rel*0.3f > 0)

@ -55,7 +55,7 @@ namespace Gui
void redraw(bool scrollbarShown = false);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
void onMouseWheelMoved(MyGUI::Widget* _sender, int _rel);
void onItemSelected(MyGUI::Widget* _sender);
private:

Loading…
Cancel
Save