Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
I am new, I am here
2
I am Alexandr Garkavenko from Kyiv, Ukraine. I am here and I stay here.
 8)
3
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on Today at 07:43:47 pm »
@ollydbg

OK, I think I have fixed this issue by using such patch:

Code
From 8523dd2bd9a58d1780c3d2efe9459f7e5fccfb41 Mon Sep 17 00:00:00 2001
From: hide<hide@hide.hide>
Date: Fri, 30 Sep 2022 15:11:28 +0800
Subject: fix the wrong tip code when Chinese comment is used


diff --git a/clangd_client/src/codecompletion/parser/parser.cpp b/clangd_client/src/codecompletion/parser/parser.cpp
index 2b9c5ea..3ddde25 100644
--- a/clangd_client/src/codecompletion/parser/parser.cpp
+++ b/clangd_client/src/codecompletion/parser/parser.cpp
@@ -2546,7 +2546,8 @@ void Parser::OnLSP_HoverResponse(wxCommandEvent& event, std::vector<ClgdCCToken>
         if (not valueItemsCount) return;
 
         json contents = pJson->at("result").at("contents");
-        wxString contentsValue = contents.at("value").get<std::string>();
+        std::string contentsValueStdString = contents.at("value").get<std::string>();
+        wxString contentsValue(contentsValueStdString.c_str(), wxConvUTF8);
 
         // Example Hover contents: L"instance-method HelloWxWorldFrame::OnAbout\n\nType: void\nParameters:\n- wxCommandEvent & event\n\n// In HelloWxWorldFrame\nprivate: void HelloWxWorldFrame::OnAbout(wxCommandEvent &event)"
         // get string array of hover info separated at /n chars.
@@ -2670,7 +2671,8 @@ void Parser::OnLSP_SignatureHelpResponse(wxCommandEvent& event, std::vector<cbCo
         json signatures = pJson->at("result").at("signatures");
         for (size_t labelndx=0; labelndx<signatureCount && labelndx<10; ++labelndx)
         {
-                wxString labelValue = signatures[labelndx].at("label").get<std::string>();
+                std::string labelValueStdString = signatures[labelndx].at("label").get<std::string>();
+                wxString labelValue(labelValueStdString.c_str(), wxConvUTF8);
                 v_SignatureTokens.push_back(cbCodeCompletionPlugin::CCCallTip(labelValue));
         }
 


I'm not sure the second hunk is needed, but the first hunk is the true fix.

@ollydbg

Would you test Clangd_Client rev 82 or the current nightly clangd_client to see if it solves the tooltip problem?

I've applied your fix for every clangd json std::string reference.
Example:
Code
 
idValue = GetwxUTF8Str(pJson->at("id").get<std::string>());

GetwxUTFStr is defined as:
Code
        wxString GetwxUTF8Str(const std::string stdString)
        {
            return wxString(stdString.c_str(), wxConvUTF8);
        }


Let me know if it works and thanks for testing.
4
Greetings,

I am new, I am here

BUT not new to Code::Blocks!

Cheers,
Sherwood
5
The ones a simple search on copyright found
Code
Copyrighted by:
  HighTec EDV-Systeme GmbH
    multiple .h, .c, .S, and .x files
  http://www.resedit.net
    resource.rc
  Free Software Foundation
    multiple Makefile.in and Makefile
6
I am using the CB Scripted wizard to create some simple projects? Do any of them have a license that is not mentioned in a source file?

Link to my git repo https://github.com/stahta01/mingw64_gcc_toolchain_test_cbprojects

I am having weird issues building MinGW64 GCC 4.8.x that are likely CRT/GCC/Binutils caused problems.
I am hoping these test project will help determine which part has the problem.

Tim S.
7
General (but related to Code::Blocks) / Thank you
« Last post by ikel on Yesterday at 09:06:06 pm »
Hi Code::Blocks developers,

Again, just to say thanks for all the efforts you put into Code::Blocks.
As for yesterday, I taught my 7 yo son on the basic of C++ programming using Code::Blocks IDE.

He found it easy to edit the file, and easy enough to hit the Build and Run button on the top toolbar.
He had a great time playing with cout, <<, endl and ;.

Many thanks.

Regards,
Ikel
8
This problem was resolved with nightly revision 12932 that uses wx321 dlls.
9
General (but related to Code::Blocks) / Re: src/update.bat change typo
« Last post by Miguel Gimenez on Yesterday at 08:25:56 pm »
Fixed in r12938, thankk you.
10
General (but related to Code::Blocks) / src/update.bat change typo
« Last post by everSome on Yesterday at 08:15:27 pm »
The new function at the end of src/update.bat, namely

:copySvgFiles - create a directory and copy avg files to it
setlocal
echo Copy svg files from %~1 to %~1
call:mkdirSilent %~2\svg
xcopy /D /y %~1\svg\*.svg %~2\svg > nul
endlocal
GOTO:EOF

would seem to have a typo in the echo line, perhaps it should be:

echo Copy svg files from %~1 to %~2
Pages: [1] 2 3 4 5 6 ... 10