wxWidgets 3.0 wxLog:: OnLog and DoLog missing? - c++

From wxWidget 3.0 documentation for wxLog http://docs.wxwidgets.org/3.0/classwx_log.html, it seems that the wxLog class no longer has a OnLog() member, which was in wxWidgets 2.8 (http://docs.wxwidgets.org/2.8/wx_wxlog.html#wxlogonlog). The 3.0 documentation mentions OnLog() once, but there is really no entry for it.
There is a similar issue for wxLog::DoLog()
I was wondering what happened to these functions. I have third party legacy code that still use these two functions. How should I migrate the legacy code with wxLog::OnLog()/DoLog()?
Thanks,

wxLog::OnLog() still exists and probably should be documented, its documentation seems to have been lost during the migration to Doxygen, thanks for noticing this. In any case, you can continue calling it.
DoLog() also still exists but is deprecated and this is actually documented in the change log:
Custom log targets should be updated to override wxLog::DoLogRecord() method  instead of DoLog() or DoLogString() and must be updated if they call the base  class versions of these functions as this won't work any more; please see the  documentation of wxLog for more information.
So while you can still continue using it as well, it will give deprecation warnings and will stop being supported by default in wxWidgets 3.2 and at all in 3.4.

Related

How to create a custom theme for QtCreator

I would like to create and share a free Qt app for easy creation of custom QtCreator themes. My problem though is not the creation of the app itself, but the format of the *.creatortheme file.
I have made a copy of the flat.creatortheme found under Tools\QtCreator\share\qtcreator\themes and since I can't find the names of the variables documented anywhere, I used the trial-and-error approach in order to figure out the meaning of the variables. For the most of them I've succeeded. However for the ones starting with Timeline_ and VcsBase_ I can't see any change in the visual appearence for my setup of the IDE (Qt 5.10.0, MSVC 2017, Windows 7).
So if I make that just for myself, that would be enough, but since I would like to share the app with the rest of you, I think I should cover those values as well.
Does anyone have an experience with this?
Any help will be appreciated.
In the source code of Qt Creator those are listed in the Color enum of the Theme class:
...
/* Timeline Library */
Timeline_TextColor,
Timeline_BackgroundColor1,
Timeline_BackgroundColor2,
Timeline_DividerColor,
Timeline_HighlightColor,
Timeline_PanelBackgroundColor,
Timeline_PanelHeaderColor,
Timeline_HandleColor,
Timeline_RangeColor,
/* VcsBase Plugin */
VcsBase_FileStatusUnknown_TextColor,
VcsBase_FileAdded_TextColor,
VcsBase_FileModified_TextColor,
VcsBase_FileDeleted_TextColor,
VcsBase_FileRenamed_TextColor,
VcsBase_FileUnmerged_TextColor,
...
According to the comments, they are used by the Timeline Library and the VcsBase Plugin.

UWP: WACK test failing on Windows Runtime metadata validation

I have a C# app targeting Windows-10 desktop platform.The C# app calls into native component written in C++. My native C++ code has Visual C++ component extensions(C++/CX).
I am trying to run WACK test for my app & I am seeing this error:
Error Found: The general metadata correctness test detected the following errors: The overloaded method XXX in yyy.winmd have the same number of in parameters without one that has DefaultOverloadAttribute. Exactly one method overload must have DefaultOverloadAttribute
Impact if not fixed: Windows store doesnt allow apps that don't pass Windows Runtime Metadata Validation.
How to fix: Please ensure that the compiler you are using to generate your Windows Runtime types is up to date with the Windows Runtime specifications
This used to work fine with VS-2015 Update 2. I installed VS-2015 Update-3 today & from then I am seeing this failure.
The strange thing is that the overloaded method mentioned in the Error Report is not overloaded at all.
I have checked this MSDN page but couldnt find any solution.
My VS details are as follows:
MS VS Professional 2015
Version 14.0.25425.01 Update 3
MS .NET Framework
Version 4.6.01038
I couldnt find any Windows Runtime Specifications anywhere. Do I need to anything additional after installing VS Update-3 ?
This seems to be a VS compiler issue. Basically WACK tool is complaining about any user defined method name "Close"
The compiler adds an IClosable implementation whenever user defined ref class has an explicit destructor. It then maps the destructor to "IClosable::Close" method. But the compiler is not complaining about user defined method named "Close".
On further digging, I found that SQLite also seem to have similar issues. This is exactly the issue which I am hitting as well.
This is the solution employed by SQLite.
After looking at the SQLite solution, I then modified my method name from "Close" to "Closedb" and now my WACK tests pass.
As of this posting the only resolution for this issue seems like not to have a method named "Close" in your code.

Upgraded java library to 1.19.0 and User model return types are all different

I'm using the Java client library for the Directory API from here:
https://developers.google.com/api-client-library/java/apis/admin/directory_v1
The com.google.api.services.admin.directory.model.User model has changed from 1.16 to 1.19.
In the old version I used to be able to do this:
List<UserAddress> userAddressList = user.getAddresses();
for(UserAddress userAddress : userAddressList) {
///
}
But now user.getAddresses is returning an Object. Same deal for getOrganizations, phones, etc... These all return an Object which upon further inspection looks like:
List<ArrayMap<String, String>>
ArrayMap extends GenericJson.
What do I have to do to get at the UserAddress, other then going back to the previous version?
It's a bug (from my point of view) in the latest versions. Use an older one like 1.16, 1.17 or the first 1.18 (latest 1.18 also have the bug).
The same thing happened in the C# client and back in May 2015 a Google developer named Eric Koleda replied:
A change to the backend had the unintended consequence of changing the discovery document for the service, making the addresses field (and others) being marked as type=any. This causes problems for strongly types languages like .NET, as you've found. The team is aware of the issue but it's unclear when a fix will be available.
However the C# client still has this problem, so I would assume the Java client does as well.
Here are a couple of issues I found in Google's issue tracker specifically for this problem in the Java client, but neither has seen any progress yet:
Issue 3645: Broken code generator for Directory API in Java client: User class lacking explicit types
Issue 3730: Latest version of the Directory API client returns Object instead of correct class

How to solve OpenCV Error "function not implemented (called functionality is disabled for current build or platform) when using VideoWriter_GPU?

Question Intro
I'm running an opencv project in Visual Studios 2010 and have implemented cuda support (refer to my previous question for precise info on my set-up). All cuda-functionalities are working fine - to the best of my knowledge - and are indeed improving speed on the image processing.
However, I now also wanted to attemp to speed up the video-writing function in this project by replacing the current cv::VideoWriter with the gpu::VideoWriter_GPU function. The reason for this is that the cv::VideoWriter seems to somehow cause processes running outside of the scope in which the VideoWriter is called to be slowed down, resulting in images available at the DirectShow driver being dropped by the VideoCapture-function, hence messing up an algorithm I've implemented.
Problem
To attempt to solve this issue, I've now replaced the VideoWriter-calls with VideoWriter_GPU-functionality (and corresponding syntax), but when I run my project (Compile & Run in Debug-mode), I get the following error-message (directly originating atthe calling of gpu::VideoWriter_GPU):
OpenCv Error: The function/feature is not implemented (The called functionality
is disabled for current build or platform) in unknown function, file
c:slave\builds\wininstallermegapack\opencv\modules\gpu\src\precomp.hpp, line 131.
and the program then ends with
code -529697949 (0xe06d7363)
I've purposely currently not included any of my code because the error-message originates so clearly from the call to the gpu::VideoWriter_GPU, which is making me think it's not a coding or syntax problem. (Please comment if you feel my code is necessary for answering this question.
My steps so far
I miss the natural gift of understanding what precisely this message means or how to interpret it. Does my opencv v2.4.4 simply not support what I want...? Does this function simply not work on my windows 7, 64bit system...?
I've checked out as many available google-hits I could find (relating to this error message and combinations of searchterms like "opencv, gpu, VideoWriter_GPU, disabled for current build") but have not understood what the problem is or how to solve it.
Corresponding header-file and error message can also be found here.
This post and this post suggest the error message is trying to tell me that opencv simply does not provide the option of using the function or functionality I am aiming to use. Or maybe even that cuda is not at all supported.. But that's all against my experience as every single opencv gpu-function I've tried to use has seemed to work fine.
Question
Could someone please explain to me why this is not working for me, and more importantly share with me what I should do to make the VideoWriter_GPU work?
Many thanks!
Maybe this link can give you a little idea of what the problem is: VideoReader_GPU not available, but built with NVCUVID?.
It seems to be that the problem is the CUDA_DISABLER var.

IThumbnailProvider and IInitializeWithItem

I am trying to develop an IThumbnailProvider for use in Windows 7. Since this particular thumbnail would also be dependant on some other files in the same directory, I need to use something other than IInitializeWithStream to a path to work with, this being IInitializeWithItem. (Alternatively, I could use IInitializeWithFile, but that is even more frowned upon apparently.)
No matter what I do, I cannot get it to work. I have Microsoft's FileTypeVerifier.exe tool which gives the green light on using IInitializeWithItem, but when explorer calls it, it only seems to try IInitializeWithStream, ever. (This was tested by temporarily implementing said interface, and Beep()ing away in its Initialize()) Did I forget to configure something?
In short: how do I get this to work?
Okay, I finally found out what is the matter. To quote the Building Thumbnail Providers link on the MSDN website:
There are cases where initialization with streams is not possible. In scenarios where your thumbnail provider does not implement IInitializeWithStream, it must opt out of running in the isolated process where the system indexer places it by default when there is a change to the stream. To opt out of the process isolation feature, set the following registry value.
HKEY_CLASSES_ROOT
CLSID
{66742402-F9B9-11D1-A202-0000F81FEDEE}
DisableProcessIsolation = 1
I knew I was running out of process since I read elsewhere that thumbnailproviders ALWAYS ran out of process. But since that particular snippet is on almost -all- shell extension handlers, I interpreted it to be a overly happy copy-paste job, since it was -required- to run in-process the way I understood it.
And I was wrong. I hope this will help someone else in the near future. :)