Re: [Development] [Interest] Modifying QQmlFileSelector selector at runtime without Loader or Component

2014-12-17 Thread Jérôme Godbout
You may try to create the object dynamically based on the selector for the
source and/or the properties.
You could try Qt.createQmlObject() or Qt.createComponent()
along createObject(). Your onSelectorChanged could delete previous instance
if any and create a new one.
https://qt-project.org/doc/qt-5-snapshot/qtqml-javascript-dynamicobjectcreation.html

You could also use a empty string property and use it's changed event to
force a revaluate of a function call (this trick is used for i18n for
example):

Loader
{
  id: myLoader
  source: Qt.resolveUrl(MyItem.qml + emptyString)
  property string emptyString: 
}

Connections
{
  target: myCppObject
  onSelectorChanged: myLoader.emptyStringChanged()
}

Not sure if those can help you out, not sure what your selector does
actually.

On Tue, Dec 16, 2014 at 12:41 AM, Alan Alpert 4163654...@gmail.com wrote:

 On Fri, Dec 12, 2014 at 8:29 PM, achart...@fastmail.fm wrote:
 
  Hello,
 
  I would like to modify the extraSelectors of QQmlFileSelector at runtime
  and have QML load the new QML file from the appropriate selector folder.
  I have gotten this to work by calling setExtraSelectors() from a C++
  object I have exposed to QML and then forcing a re-evaluation of the
  Loader's source property:
 
  Loader {
   id: myLoader
   source: Qt.resolvedUrl(MyItem.qml)
  }
 
  Connections {
   target: myCppObject
   onSelectorChanged: myLoader.source = Qt.resolvedUrl(MyItem.qml)
  }
 
  Now, for my use case I really need the ability to achieve the same
  behavior without using Loader or Component. I essentially want something
  like this:
 
  MyItem { }
 
  Connections {
   target: myCppObject
   onSelectorChanged: // when selector changes, the MyItem instance
   above is automatically resolved to the MyItem definition in the
   appropriate selector folder.
 
  How can this be accomplished?

 This cannot be accomplished (I actually tried last year). The problem
 is that you have an actual instance of MyItem there, and there's no
 way to magically map it into another instance. You have to destroy
 that instance and bring up a new one - which basically means Loader.

 What you probably want is to have certain parts of the instance shift,
 but not destroy the whole instance. For that I recommend using QtQuick
 States. You can have a base state, and then a list of property changes
 to things within the instance in a sub state and use transitions to
 animate it. That shifts the parts of the instance that need to,
 without destroying the whole thing. Or save state in another object
 (such as in a QtObject{} on the Loader) and bind your internal state
 to that so that you can use the Loader approach to recreate whole
 instances.

 PS: Moving to qt-interest since you didn't seem to be offering to
 develop this feature as a part of Qt.

 --
 Alan Alpert
 ___
 Interest mailing list
 inter...@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/interest

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] [QtIFW] Offline from online?

2014-12-17 Thread Koehne Kai
 -Original Message-
 From: development-bounces+kai.koehne=theqtcompany.com@qt-
 Subject: [Development] [QtIFW] Offline from online?
 
 Hi, QtIFW develooers!!!

Hi,

 What about creation offline installers based on shared in online repository
 components?

So far the IFW doesn't offer such functionality out of the box. Could you 
elaborate a bit on the use case you have in mind?

Regards

Kai
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Virtual keyboard

2014-12-17 Thread Helmut Mülner
I have a virtual keyboard installed (Hot Virtual Keyboard) on Windows7.
I use qt-opensource-windows-x86-msvc2013-5.4.0.

In Qt Widget programs (e.g. from examples) the keyboard works as expected:
When I click into an editable text field, the keyboard pops up.

But this does not work in QML programs like the gallery example: When I
click into a TextArea, TextEdit or TextField element, nothing happens.
It only works as expected in System Dialogs.

Is this a bug or do I miss something?

Best regards

Helmut


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt Bugtracker update and new URL

2014-12-17 Thread Frederik Gladhorn
On Monday, December 15, 2014 02:10:15 PM Blasche Alexander wrote:
 Hi,
 
 It is time to move the Qt bug tracker to its new home under qt.io. The new
 URL is going to be:
 
 https://bugreports.qt.io
 
 The change is going to happen on Wed, 7. January 2015. To facilitate the
 change the old server will be taken offline at 18:00 CET (GMT+1) and the
 latest changes will be copied to the new server. If everything goes well,
 the new server will be online at 20:00 CET (GMT+1). This implies that the
 Qt bug tracker is going to be down for about 2hrs. We are sorry for the
 inconvenience.
 
 Redirects will be in place following the move and all existing user accounts
 will continue to work.
 
 At the same time, Jira will be updated from 5.x to 6.3. The user interface
 style looks a bit different and you might find some minor new features here
 and there.

Yay for updating JIRA!

A big thanks to Alex and everyone involved in making this happen :)
Thanks for all the work you put into maintaining the bug tracker!

Cheers,
Frederik

 
 As always, if you encounter any problems when using the new Jira instance,
 please file a report against the QTJIRA project
 (http://bugreports.qt.io/browse/QTJIRA) and if you are not even able to
 login you may use jira-admin (at) qt-project.org.
 
 --
 Alex
 ___
 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


[Development] Assistant documentation can not be copied anymore?

2014-12-17 Thread Bernhard
Hi!

After searching for functions and features in Qt Assistant  I used to copy
code snippets (like function names, signatures etc.) from the Assistant
pages. Starting with Qt5.4 that got pretty annoying.

Still copied code looks perfectly fine but VS2013 Intellisense and compiler
complain about strange errors. It seems there are invisible characters
hidden in the assistant pages that break the code. VS editor doesn't show
these characters at all which is extremely annoying and hard to figure out.

E.g. I tried to copy the prototype of the QWidget::showEvent into the VS
editor. It contains an invisible but harmful character that can't be
compiled (seems the character is inserted directly in front if the
showEvent function name).

Has something changed in the formatting Assistant's pages from Qt 5.3.2 to
Qt 5.4? Can someone confirm/explain this?

-- 
Kind Regards
Bernhard Lindner



___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Assistant documentation can not be copied anymore?

2014-12-17 Thread Reinio Topi

Hi Bernhard,

This change is in qdoc, the tool that generates the documentation. 
Zero-width-space characters are injected into the function signatures, allowing 
browsers to break up long signatures over multiple lines in a nice manner - 
this was made to improve the looks of the new online documentation style, 
published under http://doc.qt.io.

The fact that it breaks copy-paste in some of the editors is unfortunate - 
thanks for reporting this, we'll look into it.

\topi

From: development-bounces+topi.reinio=theqtcompany@qt-project.org 
development-bounces+topi.reinio=theqtcompany@qt-project.org on behalf of 
Bernhard priv...@bernhard-lindner.de
Sent: Wednesday, December 17, 2014 12:40 PM
To: development@qt-project.org
Subject: [Development] Assistant documentation can not be copied anymore?

Hi!

After searching for functions and features in Qt Assistant  I used to copy
code snippets (like function names, signatures etc.) from the Assistant
pages. Starting with Qt5.4 that got pretty annoying.

Still copied code looks perfectly fine but VS2013 Intellisense and compiler
complain about strange errors. It seems there are invisible characters
hidden in the assistant pages that break the code. VS editor doesn't show
these characters at all which is extremely annoying and hard to figure out.

E.g. I tried to copy the prototype of the QWidget::showEvent into the VS
editor. It contains an invisible but harmful character that can't be
compiled (seems the character is inserted directly in front if the
showEvent function name).

Has something changed in the formatting Assistant's pages from Qt 5.3.2 to
Qt 5.4? Can someone confirm/explain this?

--
Kind Regards
Bernhard Lindner



___
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] tst_qwindow failing frequently in dev

2014-12-17 Thread Simon Hausmann
On Tuesday 16. December 2014 13.08.17 Thiago Macieira wrote:
 On Wednesday 03 December 2014 12:14:26 Simon Hausmann wrote:
  I was able to reproduce this together with Jørgen and uploaded a
  prospective fix at
  
  https://codereview.qt-project.org/#/c/101345/
 
 The fix seems to have made its way to dev already[1], but I'm still getting
 the error:
 
   FAIL!  : tst_QWindow::positioning(default) Compared values are not the
 same Actual   (((framePos)))  : QPoint(639,477)
  Expected (window.framePosition()): QPoint(80,80)
 
 http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_04826/macx
 -clang_developer-build_qtnamespace_OSX_10.7/log.txt.gz
 
 Note that the actual position is now VERY different. Before, it was just
 slightly different.

Yeah, previously it tried to move the window just a little, and so when Jørgen 
and I looked into the test we suspected that the window manager might prevent 
us from moving the window sometimes because it might go _into_ the system menu 
bar (where you can't move a window into at least as a user). Therefore we 
changed the test to move the window into the center of the screen, which 
explains the Actual value.

Note how Actual and Expected are swapped, because the test is written as

QCOMPARE(framePos, window.framePosition())

So what _is_ happening is that we call QWindow::setFramePosition, which calls 
QCocoaWindow::setGeometry and after waiting for the reception of a 
QEvent::Move, the value that QWindow::framePosition() returns is not what we 
set earlier.



Simon
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Virtual keyboard

2014-12-17 Thread Helmut Mülner
  I have a virtual keyboard installed (Hot Virtual Keyboard) on Windows7.
  I use qt-opensource-windows-x86-msvc2013-5.4.0.

  In Qt Widget programs (e.g. from examples) the keyboard works as
expected:
  When I click into an editable text field, the keyboard pops up.

  But this does not work in QML programs like the gallery example: When I
click into a
  TextArea, TextEdit or TextField  element, nothing happens.
  It only works as expected in System Dialogs.

  Is this a bug or do I miss something?


I did some further research and this seems to be connected to
https://bugreports.qt-project.org/browse/QTBUG-42906

Best Regards
Helmut

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] qmake vcxproj generator issue

2014-12-17 Thread raven-worx Software
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) SOME-INCLUDE-FLAGS 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

2014-12-17 Thread Joerg Bornemann
On 17-Dec-14 16:10, raven-worx Software wrote:

 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.

 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.

 E.g. the command written to the project file looks like this:
 cl -c $(CXXFLAGS) SOME-INCLUDE-FLAGS tools\qstring_compat.cpp
 -Fo.obj\debug\qstring_compat.obj

$(CXXFLAGS) is a variable meant for nmake. Nobody thought of making this 
work with VS project files. And nobody will, if I'm not totally 
mistaking the crowd's motivation wrt this issue.


BR,

Joerg
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] A better headersclean test

2014-12-17 Thread Thiago Macieira
Hello all

I've previously mentioned this, but I can't find the link in the archives.

I've implemented a better headersclean check that can't be forgotten. You can 
find it at https://codereview.qt-project.org/45533

This email is to ask for when it should be enabled: Lars and Ossi in the mail 
discussion requested it be disabled by default. I think it should be enabled 
alongside developer-build and it should have an option to turn off, like the 
one for -warnings-are-errors (-no-warnings-are-errors) which applies to the 
*.cpp files.

The reason I am asking for this is because having our own headers be clean of 
warnings is a feature. And just like our binary compatibility guarantees, it 
should be tested and enforced in the CI, which in turn requires everyone to 
know whether they're introducing warnings or not. 

But I'll be happy if this gets enabled in the CI.


Features:
1) unlike the previous solution, this does not require adding a unit test, 
which only 9 out of 25 modules had

2) unlike the previous solution, this compiles each header independently, thus 
catching any mistakes that could have been hidden by another header getting 
included first

3) headers that should not be tested can be skipped by adding
#pragma qt_sync_skip_header_check
  though outside of QtCore, you should really not be doing this

4) if a debug-and-release build is active, this applies only to the release 
build (with many compilers, especially GCC, warnings are often the result of 
optimisations)

Drawback:
It increases the build time considerably (25 to 33%) due to having a lot more 
files to compile, and always without PCH.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development