Issues

54 views
Skip to first unread message

Simon Gemmell

unread,
Jan 7, 2013, 6:28:46 AM1/7/13
to qtil...@googlegroups.com
1)  Not sure what the intention with the Qtilities #include is in /include, but it doesn't seem to pull in <QtilitiesApplication>. i.e. #include <Qtilities> is not sufficient for using Qtilities. 

2) When compiling with VS2010 the following warning is issued:
qtilities\include\qtilitiescoregui\../../src/CoreGui/source/TreeNode.h(441): warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(510) : see declaration of 'Qtilities::Core::Observer::objectBase'
Maybe keep objectBase virtual in Observer? 

3) When building (qmake) I get a warning about printsupport:
c:\Qt\4.8.4\bin\qmake.exe -o Makefile ProjectManagement.pro
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport

Regards,
Simon

Simon Gemmell

unread,
Jan 7, 2013, 6:56:34 PM1/7/13
to qtil...@googlegroups.com
Sorry, that all seems a bit abrupt - please read the above with:

Hi, 

I am using the latest from GIT and I thought I'd bring the following to your attention:

...

Jaco Naude

unread,
Jan 8, 2013, 1:07:43 AM1/8/13
to qtil...@googlegroups.com
Hi Simon

No problem. Please see my responses inline below.

1)  Not sure what the intention with the Qtilities #include is in /include, but it doesn't seem to pull in <QtilitiesApplication>. i.e. #include <Qtilities> is not sufficient for using Qtilities. 
I've not run into problems with this, but I was wondering if it might be a namespace issue. Are you using the following after the include?

"using namespace Qtilities;"

If so, I think this commit will fix that. If you are still getting it, please let me know and also then try the following please:

"using namespace QtilitiesCoreGui;"

2) When compiling with VS2010 the following warning is issued:
qtilities\include\qtilitiescoregui\../../src/CoreGui/source/TreeNode.h(441): warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(510) : see declaration of 'Qtilities::Core::Observer::objectBase'
Maybe keep objectBase virtual in Observer? 
Thanks, fixed.

3) When building (qmake) I get a warning about printsupport:
c:\Qt\4.8.4\bin\qmake.exe -o Makefile ProjectManagement.pro
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Thanks, fixed.

Cheers
Jaco


--
To post to this group, send email to qtil...@googlegroups.com
To unsubscribe from this group, send email to
qtilities+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/qtilities?hl=en?hl=en



--
Jaco Naude'

Qtilities: Building blocks for Qt applications.

Simon Gemmell

unread,
Jan 8, 2013, 7:18:50 PM1/8/13
to qtil...@googlegroups.com


Hi Simon

No problem. Please see my responses inline below.

1)  Not sure what the intention with the Qtilities #include is in /include, but it doesn't seem to pull in <QtilitiesApplication>. i.e. #include <Qtilities> is not sufficient for using Qtilities. 
I've not run into problems with this, but I was wondering if it might be a namespace issue. Are you using the following after the include?

"using namespace Qtilities;"

If so, I think this commit will fix that. If you are still getting it, please let me know and also then try the following please:

"using namespace QtilitiesCoreGui;"

The problem is that if I do:
#include <Qtilities>
using namespace Qtilities::CoreGui;

It doesn't find the Qtilities::CoreGui namespace (main.cpp(22): error C2039: 'CoreGui' : is not a member of 'Qtilities'), which is where QtilitiesApplication lives. Which is why I thought the <Qtilities> include was just not pulling in <QtilitiesApplication>. If I do:

#include <QtilitiesApplication>
using namespace Qtilities::CoreGui;

It works fine.

With the latest version 
#include <Qtilities>
using namespace Qtilities;
And
#include <Qtilities>
using namespace QtilitiesCoreGui;

Bot result in namespacing issues, the former when using QtilitiesApplication, the latter can't find QtilitiesCoreGui.


2) When compiling with VS2010 the following warning is issued:
qtilities\include\qtilitiescoregui\../../src/CoreGui/source/TreeNode.h(441): warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(510) : see declaration of 'Qtilities::Core::Observer::objectBase'
Maybe keep objectBase virtual in Observer? 
Thanks, fixed.

Unfortunately that didn't fix the warning. I can confirm that TreeNode.h doesn't have objectBase any more (see below the line numbers have changed by 5 - the number of lines removed in your changset)....
c:\tkbt\gemmellslaunch\qtilities\src\coregui\source\TreeNode.h(436) : warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
        c:\tkbt\gemmellslaunch\qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(510) : see declaration of 'Qtilities::Core::Observer::objectBase
'
c:\tkbt\gemmellslaunch\qtilities\src\coregui\source\TreeNode.h(436) : warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
        c:\tkbt\gemmellslaunch\qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(509) : see declaration of 'Qtilities::Core::Observer::objectBase
'

The warning description is here.

Looks like TreeNode is multiply inheriting and getting  an objectBase() from AbstractTreeItem (which inherits IObjectBase) AND Observer.


Further warnings which I missed last time:
source\ObserverData.cpp(785) : warning C4806: '==' : unsafe operation: no value of type 'bool' promoted to type 'Qtilities::Core::Interfaces::IExportable::Result' can equal the given constant
source\ObserverData.cpp(875) : warning C4806: '==' : unsafe operation: no value of type 'bool' promoted to type 'Qtilities::Core::Interfaces::IExportable::Result' can equal the given constant

and

source\FileLocker.cpp(79) : warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(433) : see declaration of 'getenv'
 
3) When building (qmake) I get a warning about printsupport:
c:\Qt\4.8.4\bin\qmake.exe -o Makefile ProjectManagement.pro
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Using Qtilities Core Gui Module...
Project MESSAGE: Using Qtilities Core Module...
Project MESSAGE: Using Qtilities Logging Module...
Project MESSAGE: Warning: unknown QT: printsupport
Thanks, fixed

Can confirm that ones fixed.

Jaco Naude

unread,
Jan 9, 2013, 12:42:17 AM1/9/13
to qtil...@googlegroups.com
Hi Simon

Again, please see my responses inline below.

Thanks again for the feedback,
Jaco


On Wed, Jan 9, 2013 at 2:18 AM, Simon Gemmell <simong...@gmail.com> wrote:


Hi Simon

No problem. Please see my responses inline below.

1)  Not sure what the intention with the Qtilities #include is in /include, but it doesn't seem to pull in <QtilitiesApplication>. i.e. #include <Qtilities> is not sufficient for using Qtilities. 
I've not run into problems with this, but I was wondering if it might be a namespace issue. Are you using the following after the include?

"using namespace Qtilities;"

If so, I think this commit will fix that. If you are still getting it, please let me know and also then try the following please:

"using namespace QtilitiesCoreGui;"

The problem is that if I do:
#include <Qtilities>
using namespace Qtilities::CoreGui;

It doesn't find the Qtilities::CoreGui namespace (main.cpp(22): error C2039: 'CoreGui' : is not a member of 'Qtilities'), which is where QtilitiesApplication lives. Which is why I thought the <Qtilities> include was just not pulling in <QtilitiesApplication>. If I do:

#include <QtilitiesApplication>
using namespace Qtilities::CoreGui;

It works fine.

With the latest version 
#include <Qtilities>
using namespace Qtilities;
And
#include <Qtilities>
using namespace QtilitiesCoreGui;

Bot result in namespacing issues, the former when using QtilitiesApplication, the latter can't find QtilitiesCoreGui.

I will look into this in more detail. I always include the modules I use which I know works and you can use this as a workaround for now. For example:

#include <QtilitiesCoreGui>
using namespace QtilitiesCoreGui

which will automatically include all its dependencies (Core and Logging). The same can be done for all modules as described in the namespace documentation. For example see the bottom of this page. I've created an issue to track future progress on this.



2) When compiling with VS2010 the following warning is issued:
qtilities\include\qtilitiescoregui\../../src/CoreGui/source/TreeNode.h(441): warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(510) : see declaration of 'Qtilities::Core::Observer::objectBase'
Maybe keep objectBase virtual in Observer? 
Thanks, fixed.

Unfortunately that didn't fix the warning. I can confirm that TreeNode.h doesn't have objectBase any more (see below the line numbers have changed by 5 - the number of lines removed in your changset)....
c:\tkbt\gemmellslaunch\qtilities\src\coregui\source\TreeNode.h(436) : warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
        c:\tkbt\gemmellslaunch\qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(510) : see declaration of 'Qtilities::Core::Observer::objectBase
'
c:\tkbt\gemmellslaunch\qtilities\src\coregui\source\TreeNode.h(436) : warning C4250: 'Qtilities::CoreGui::TreeNode' : inherits 'Qtilities::Core::Observer::Qtilities::Core::Observer::objectBase' via dominance
        c:\tkbt\gemmellslaunch\qtilities\include\qtilitiescore\../../src/Core/source/Observer.h(509) : see declaration of 'Qtilities::Core::Observer::objectBase
'

The warning description is here.

Looks like TreeNode is multiply inheriting and getting  an objectBase() from AbstractTreeItem (which inherits IObjectBase) AND Observer.

 
Will look into this in more detail as well. I understand what the real issue is now. Also created an issue to track progress on it.
 

Further warnings which I missed last time:
source\ObserverData.cpp(785) : warning C4806: '==' : unsafe operation: no value of type 'bool' promoted to type 'Qtilities::Core::Interfaces::IExportable::Result' can equal the given constant
source\ObserverData.cpp(875) : warning C4806: '==' : unsafe operation: no value of type 'bool' promoted to type 'Qtilities::Core::Interfaces::IExportable::Result' can equal the given constant

Thanks, fixed.

and

source\FileLocker.cpp(79) : warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(433) : see declaration of 'getenv

I've added a pragma to disable this warning. I'm using getenv() in a safe way as far as I can tell, thus it should not be an issue. Can you please confirm that the warning is no longer displayed.

Simon Gemmell

unread,
Jan 10, 2013, 8:20:50 PM1/10/13
to qtil...@googlegroups.com
Will get back to you asap, we're in the middle of a release right now.
Reply all
Reply to author
Forward
0 new messages