Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kdevelop compilation error: adaptsignatureassistant.cpp #59

Open
metamode opened this issue May 27, 2015 · 0 comments
Open

Kdevelop compilation error: adaptsignatureassistant.cpp #59

metamode opened this issue May 27, 2015 · 0 comments

Comments

@metamode
Copy link

I fixed this:

[ 97%] Building CXX object languages/cpp/tests/CMakeFiles/cppcodecompletiontest.dir/__/codegen/unresolvedincludeassistant.cpp.o
/tmp/kdevelop20150527-62031-hvop2w/kdevelop-4.7.0/languages/cpp/codegen/adaptsignatureassistant.cpp:97:18: error: no viable overloaded '='
  m_oldSignature = {};
  ~~~~~~~~~~~~~~ ^ ~~
/tmp/kdevelop20150527-62031-hvop2w/kdevelop-4.7.0/languages/cpp/codegen/adaptsignatureaction.h:35:8: note: candidate function (the implicit move assignment operator) not viable: cannot convert initializer list argument to 'Cpp::Signature'
struct Signature
       ^
/tmp/kdevelop20150527-62031-hvop2w/kdevelop-4.7.0/languages/cpp/codegen/adaptsignatureaction.h:35:8: note: candidate function (the implicit copy assignment operator) not viable: cannot convert initializer list argument to 'const Cpp::Signature'
struct Signature
       ^
1 error generated.
make[2]: *** [languages/cpp/tests/CMakeFiles/cppassistantstest.dir/__/codegen/adaptsignatureassistant.cpp.o] Error 1

By patching adaptsignatureassistant.cpp as follows:

--- a/languages/cpp/codegen/adaptsignatureassistant.cpp
+++ b/languages/cpp/codegen/adaptsignatureassistant.cpp
@@ -18,6 +18,8 @@

 #include "adaptsignatureassistant.h"

+#include <utility>
+
 #include <interfaces/icore.h>
 #include <interfaces/ilanguagecontroller.h>
 #include <language/assistant/renameaction.h>
@@ -33,6 +35,7 @@
 #include "cppduchain.h"
 #include "qtfunctiondeclaration.h"

+
 using namespace KDevelop;
 using namespace Cpp;

@@ -94,7 +97,9 @@
   m_otherSideId = {};
   m_otherSideTopContext = {};
   m_otherSideContext = {};
-  m_oldSignature = {};
+  Signature tempSignature;
+  //m_oldSignature = {};
+  std::swap(m_oldSignature, tempSignature);
   m_document = {};
   m_view.clear();
 }

Without the patch kdevelop compilation fails near the end and doesn't install.

@faun faun mentioned this issue Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant