[Development] Wrong resize event for QAbstractScrollArea derives
Hi, a question out of curiosity: In QAbstractScrollArea::viewportEvent() a resize event is passed to the base class implementation of the event handler. Whats the reason for doing this for a non input event? I'm asking because, this actually causes that you receive a wrong resize event for your scroll area widget, which actually didn't resize at all. I hope i haven't overseen something? You can find this code in Qt4 and still in Qt5. thanks. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Wrong resize event for QAbstractScrollArea derives
> On Friday 11 October 2013 13:31:31 raven-worx Software wrote: >> Hi, >> >> a question out of curiosity: >> In QAbstractScrollArea::viewportEvent() a resize event is passed to >> the base class implementation of the event handler. Whats the reason >> for doing this for a non input event? >> >> I'm asking because, this actually causes that you receive a wrong >> resize event for your scroll area widget, which actually didn't resize >> at all. >> >> I hope i haven't overseen something? >> >> You can find this code in Qt4 and still in Qt5. > > Because QAbstractScrollArea::resizeEvent, as documented, is supposed to be > called when the viewport is called. > This is the behaviour of QAbstractScrollArea with most event. you can > intercept viewport event form the widget itself. > One can argue if it is a good idea, but it has been like that since > Qt 4.0 and > is not going to change now. > > -- > Olivier > > Woboq - Qt services and support - http://woboq.com - http://code.woboq.org > i know that is like this - as i already stated ;) I was asking if there is a special reason for doing this for a event which is not an input event, because you just receive the wrong size in the event... Which of course makes sense for input event derivations but not for the resize event. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
[Development] QtWebkit to vcxproj
Hi, i am trying to create a vcxproj-Project of the QtWebKit module. For that i call "qmake -tp vc -r" This results in error "Project ERROR: Strict subdir dependencies can only be used with subdirs template" (https://bugreports.qt.io/browse/QTBUG-50099) I can get rid of this error by commenting all lines which call addStrictSubdirOrderBetween() in the affected .pro files. So far so good. I now have a solution which contains and successfully builds most QtWebKit projects. The only projects i still have issues with are WTF, WebCore and JavaScriptCore. WTF -- Now when i call "qmake -tp vc WTF.pro" it returns without any output and it seems like it finished successfully. But no project is created and it silently fails. Now when i call "qmake -tp vc WTF.pro -o WTF.vcxproj" instead i get several messages like: "qtwebkit/Source/WTF/WTF.pri:16: 'use?' is not a recognized test function" messages WebCore - calling "qmake -tp vc WebCore.pro -o WebCore.vcxproj" results in: Info: creating cache file C:\Qt\Qt-5.x-git\qtwebkit\Source\WebCore\WebCore.vcxproj\.qmake.cache Running configure tests... Checking for fontconfig... QDir::mkpath: Empty or null file name C:/Qt/Qt-5.x-git/qtbase/mkspecs/features/configure.prf:68: Cannot create directory . Project ERROR: Aborting. So my question is how can i create "Qt-ified" webkit core projects? regards. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QtWebkit to vcxproj
Which begs the question: Why? I'm not claiming it's not possible. But building Qt itself within Visual Studio Is not common, let alone Qt WebKit. Kai to integrate it into our "development ecosystem" and use the advantages of Visual Studio environment (visual debugging, central property sheets, central compiler optimizations, etc) A lot of tiny things which add up. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QtWebkit to vcxproj
Oswald Buddenhagen wrote: note that vcxproj support for the build of qt as a whole has been dropped a while ago, which is reflected by incomplete projects being generated. you may be able to use them successfully for debugging, but there is no way to use them for actually building qt reliably. i know. I had do to some fixing in the generated projects to make them compile. But those generated vcxproj files were essential to get started with. Now i have a Qt5 (almost all major modules) converted and compiling adn even running. QtWebkit conversion also looks good so far. Only WTF, JavaScriptCore and WebCore modules are missing. The webkit sources already come with vcxproj files of these 3 modules. Can i take those instead directly? Meaning are those just core modules of Webkit? Or do they need some special Qt configuration? ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
[Development] qmake vcxproj generator issue
Hi, i am using the command "qmake -tp vc -r" to generate Visual Studio projects. With Qt 5.3 and MSVC2008 this worked flawlessly. But since Qt 5.4 can't be compiled with MSVC2008 anymore i switched to MSVC2013. The command runs without errors and creates the .vcxproj files, so far so good. Now the problem occurs in the QtCore project (probably also in others, but i am stuck here for now): There are custom build steps generated for "qstring_compat.obj" and "qvector_msvc.obj". (Because they can't be compiled with precompiled headers). Building the generated project results in an linker error for these 2 files. That is because the command line for this custom build step is missing the compiler flags. This causes that the msvc linker tries then to link incompatible obj files. In detail it is trying to link 'StaticRelease' binaries with 'DynamicDebug'/'DynamicRelease' binaries. E.g. the command written to the project file looks like this: cl -c $(CXXFLAGS) tools\qstring_compat.cpp -Fo.obj\debug\qstring_compat.obj Notice the $(CXXFLAGS). Which is actually a left-over from the qmake project generation process and wasn't substituted?! The $(CXXFLAGS) is interpreted by MSVC and expanded as "" since it is an unknown macro. So the problem is that qmake doesn't expand the $(CXXFLAGS) with the same compiler flags used by the project to match all other object files. Or is the fault on my side? Please let me know. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] qmake vcxproj generator issue
>> i am using the command "qmake -tp vc -r" to generate Visual Studio projects. >> With Qt 5.3 and MSVC2008 this worked flawlessly. >> But since Qt 5.4 can't be compiled with MSVC2008 anymore i switched to >> MSVC2013. > > What do you mean by "Qt 5.4 can't be compiled with MSVC2008 anymore"? > Visual Studio 2008 is still a supported toolchain. According to the issues i encountered during compilation with MSVC2008 this isn't fully true: In Qt 5.3.x: .) MSVC 2008 is missing the C9x headers (stdint.h) which are mandatory to compile Webkit module. So i needed to provide them myself. .) when configuring with "-developer-build" option some tests can't be compiled. This is because some intrinsics are only available from MSVC 2010 onwards. I had to patch "qtbase\src\corelib\arch\qatomic_msvc.h" with: # if _MSC_VER > 1500 # define Q_ATOMIC_INT16_IS_SUPPORTED # endif In Qt 5.4.x: .) WebEngine module can only be compiled with MSVC 2013. I understand that this dependency comes from Chromium itself, so no problem. .) With Qt 5.4.0 the project libGLESv2 was upgraded with ANGLE 2.1 sources. Which uses heavily the 'auto' keyword on the one hand and 'std::unordered_map' on the other hand. From MSVC2010 onwards the 'auto' keyword has a different meaning than in MSVC2008 (see http://msdn.microsoft.com/en-us/library/6k3ybftz%28v=vs.100%29.aspx). And the unordered_map is only contained in the std::tr1:: namespace in MSVC2008 and was moved to the std:: namespace only in later MSVC versions. So you would need heavy source modifications to make this compile with MSVC2008. >> The command runs without errors and creates the .vcxproj files, so far >> so good. > > And AFAIU you're calling configure, then "qmake -tp vc -r" to create > VS project files to build Qt? What is the use case for doing that? > If this approach worked for 5.3, then you were lucky. Nobody tests > this way of building. This has just economic build and mostly convenience reasons to have Qt integrated into Visual Studio. Guess i was lucky, but since the compilation worked like a charm until Qt 5.3 i assumed it was intended to work ;) But i also noticed yesterday that MSVC2008 has no problem with the missing flags and successfully links the 'incompatible' obj files. But i have to admit i haven't tried to build an application with it afterwards. I can only say that the makefile generated Qt binaries work with MSVC2008 but not the ones created from the VCPROJ files though. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
[Development] Errors in release mode only
Hi, i get the following print outs to the console and absolutley have no clue why: SHIMVIEW: ShimInfo(Complete) QEventLoop: Cannot be used without QApplication QObject::connect: Cannot connect (null)::aboutToQuit() to QNativeWifiEngine::closeHandle() But this only happens in RELEASE MODE! DEBUG mode works fine and these print outs are not showing up. I even get these print outs when my main() only returns 0, so no QApplication is instantiated meaning as soon as i link against Qt binaries. Once the application starts up i also noticed that (queued) signals from other threads are not delivered anymore, which most probably involves the QEventLoop error message somehow. But on the other hand events from the OS are delivered. I am using: QtCreator 3.3.1, MSVC2012, Qt 5.4.1 ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Errors in release mode only
As i said, i get it even when i just compile this piece of code and link to Qt binaries (core, gui, widgets, network) and only in release: int main(int argc, char *argv[]) { QApplication app(argc, argv); return app.exec(); } I guess this is only an issue on Windows. >> QEventLoop: Cannot be used without QApplication > > Says everything. > > Show your code. > > Regards, > Konstantin > > 2015-03-30 23:21 GMT+04:00 raven-worx Software : > >> Hi, >> >> i get the following print outs to the console and absolutley have no clue >> why: >> >> SHIMVIEW: ShimInfo(Complete) >> QEventLoop: Cannot be used without QApplication >> QObject::connect: Cannot connect (null)::aboutToQuit() to >> QNativeWifiEngine::closeHandle() >> >> But this only happens in RELEASE MODE! DEBUG mode works fine and these >> print outs are not showing up. >> >> I even get these print outs when my main() only returns 0, so no >> QApplication is instantiated meaning as soon as i link against Qt >> binaries. >> >> Once the application starts up i also noticed that (queued) signals >> from other threads are not delivered anymore, which most probably >> involves the QEventLoop error message somehow. But on the other hand >> events from the OS are delivered. >> >> I am using: >> QtCreator 3.3.1, MSVC2012, Qt 5.4.1 >> >> >> ___ >> Development mailing list >> Development@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/development >> > ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Errors in release mode only
i found what caused the issue: I accidentally also linked some other code to the application in which a static initialization of a QNetworkAccessManger happened. This also explains the different behavior between release and debug mode. >> QEventLoop: Cannot be used without QApplication > > Says everything. > > Show your code. > > Regards, > Konstantin > > 2015-03-30 23:21 GMT+04:00 raven-worx Software : > >> Hi, >> >> i get the following print outs to the console and absolutley have no clue >> why: >> >> SHIMVIEW: ShimInfo(Complete) >> QEventLoop: Cannot be used without QApplication >> QObject::connect: Cannot connect (null)::aboutToQuit() to >> QNativeWifiEngine::closeHandle() >> >> But this only happens in RELEASE MODE! DEBUG mode works fine and these >> print outs are not showing up. >> >> I even get these print outs when my main() only returns 0, so no >> QApplication is instantiated meaning as soon as i link against Qt >> binaries. >> >> Once the application starts up i also noticed that (queued) signals >> from other threads are not delivered anymore, which most probably >> involves the QEventLoop error message somehow. But on the other hand >> events from the OS are delivered. >> >> I am using: >> QtCreator 3.3.1, MSVC2012, Qt 5.4.1 >> >> >> ___ >> Development mailing list >> Development@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/development >> > ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development