From 49bbf3a4f6aea366009f0bca27ab0ded34e0bff4 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 26 Apr 2015 16:05:59 +0200 Subject: [PATCH] Changed LinkApp::renameFile() to setFile() The original method name suggested it might rename the file on disk, which it does not. --- src/gmenu2x.cpp | 2 +- src/linkapp.cpp | 2 +- src/linkapp.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index 1982adb..45ea6b6 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -994,7 +994,7 @@ void GMenu2X::editLink() { x++; } rename(linkApp->getFile().c_str(),newFileName.c_str()); - linkApp->renameFile(newFileName); + linkApp->setFile(newFileName); INFO("New section index: %zd.\n", newSectionIndex - menu->getSections().begin()); diff --git a/src/linkapp.cpp b/src/linkapp.cpp index 1b00909..83a6ce2 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -675,6 +675,6 @@ void LinkApp::setSelectorFilter(const string &selectorfilter) { edited = true; } -void LinkApp::renameFile(const string &name) { +void LinkApp::setFile(const string &name) { file = name; } diff --git a/src/linkapp.h b/src/linkapp.h index c673361..316eddc 100644 --- a/src/linkapp.h +++ b/src/linkapp.h @@ -93,7 +93,7 @@ public: bool isEditable() { return editable; } const std::string &getFile() { return file; } - void renameFile(const std::string &name); + void setFile(const std::string &name); private: void drawLaunch(Surface& s);