Re: [Interest] Unable to determine callable overload.

2015-12-15 Thread Jérôme Godbout
if you provide:
hashFile(QCryptographicHash::Algorithm,QString,bool=true)

you must delete the
hashFile(QCryptographicHash::Algorithm,QString)

since the follwoing call will be confused and could be either method:
hashFile(myAlgo, "my string");

handle the default case into the default value for without any bool.

On Tue, Dec 15, 2015 at 12:51 PM, Jason H  wrote:

>
> Whenever I give a default parameter value in C++ (where the bool=true
> below) I get this error:
> Error: Unable to determine callable overload.  Candidates are:
> hashFile(QCryptographicHash::Algorithm,QString)
> hashFile(QCryptographicHash::Algorithm,QString,bool)
>
> Removing the default value resolves it. Is there a way I can avoid this
> error and provide a default?
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Unable to determine callable overload.

2015-12-15 Thread Jason H

Whenever I give a default parameter value in C++ (where the bool=true below) I 
get this error:
Error: Unable to determine callable overload.  Candidates are:
hashFile(QCryptographicHash::Algorithm,QString)
hashFile(QCryptographicHash::Algorithm,QString,bool)

Removing the default value resolves it. Is there a way I can avoid this error 
and provide a default?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Fonts and Qt5

2015-12-15 Thread Thiago Macieira
On Monday 14 December 2015 23:56:30 Frank Mertens wrote:
> 2 ideas, here:
>   * call QGuiApplication::setFont() in your main()
>   * use qtconfig to setup Qt5 defaults

There's no qtconfig for Qt 5.

Recommendation: don't do anything. Qt is supposed to select the best font for 
you based on system defaults. Don't override it.

If you think there's something wrong with the font it selected, that's a 
different story.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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


Re: [Interest] How prevent "Code will never be executed" when compiling "qDebug() << enumvar" ?

2015-12-15 Thread Thiago Macieira
On Monday 14 December 2015 21:44:47 Edward Sutton wrote:
> #ifdef QT_DEBUG // Fix iOS Clang warning "Code will never be executed"
> 
> qDebug() << "TapAndHoldGesture: " << tapAndHold->state();
> 
> #endif

We have not seen this warning. What version of Xcode is this warning showing 
up on?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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


[Interest] Efficient QString construction

2015-12-15 Thread Julius Bullinger
Hello,

What is the currently recommended way to concatenate several QStrings and/or 
string literals? Take this code as an example:


QImage img;

QString getProjectDir();

// ...



QString basename = QFileInfo(imgPath).baseName();

QString thumbPath = getProjectDir() + "/thumb_" + basename + ".jpg";

img.save(thumbPath);


I found several blog posts and wiki articles recommending one or multiple of:


1.   QStringLiteral

2.   QLatin1String

3.   QStringBuilder

4.   Simple string literals

Since this may have changed over time, what do current best practices say?

Best regards,
Julius

[1]: http://blog.qt.io/blog/2014/06/13/qt-weekly-13-qstringliteral/
[1] and [2]: http://woboq.com/blog/qstringliteral.html
[3:] https://wiki.qt.io/Using_QString_Effectively and

http://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/

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


Re: [Interest] QWebSocket flow control?

2015-12-15 Thread Thiago Macieira
On Monday 14 December 2015 16:54:53 Nesuan Taiso wrote:
> How can I determine the amount of queued (unsent) data in a QWebSocket?
> 
> Why do I want to know this? Well for example, let's say I'm trying to
> send real-time video over websocket.

Then you're doing it wrong. If you want to send real-time content, use a real-
time protocol like RTP. WebRTC specifies a different transport protocol than 
websockets.

> My priorities are (highest to lowest):
> 1) Minimum possible latency (no more than unloaded ping roundtrip).
> 2) Send as much data as possible.

Neither of which are goals of websocket. You're asking for a datagram-based 
protocol, like RTP.

> If I was trying to do something similar over a QIODevice (like
> QTcpSocket) I would just connect to QIODevice::bytesWritten and write
> some more data whenever QIODevice::bytesToWrite is 0. In this way no
> buffers will ever fill up (and introduce unwanted delays) but I still
> send the best video quality possible (given the available bandwidth).

That's one way, but if I were you I'd implement RTP/RTCP using QUdpSocket.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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


Re: [Interest] Fonts and Qt5

2015-12-15 Thread Thiago Macieira
On Monday 14 December 2015 10:18:52 Duane wrote:
> One thing that I notice is that for my Linux build, if I check the font
> family using QApplciation::font(), on Qt4 I get DejaVu which exists on
> my system and the point size is 12.  With Qt5 this returns "Sans Serif"
> which doesn't exist and the point size is 9.  If I set the Qt5 version
> to use DejaVu with a point size of 12 this works.

> Any idea what is different here?  Does the "default" Qt that gets
> installed with the online installer or maintenance tool have fontconfig
> support built in or not?

It does, which is why "Sans Serif" exists. It's not a font, it's a standard 
name and fontconfig will resolve that to an ok sans serif font.

Make sure you don't have a font configured for Qt 4 with qtconfig. If you do, 
remove ~/.config/Trolltech.conf.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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


Re: [Interest] [Qt3D] QAxisActionHandler axis value bounds

2015-12-15 Thread Nye
Hello,
I think I get it now. Thanks!

On Mon, Dec 14, 2015 at 5:50 PM, Sean Harmer  wrote:

> Hi,
>
> On Monday 14 Dec 2015 17:36:55 Nye wrote:
> > Hello Sean,
> > Thanks, that mostly clears things up. Only one additional question:
> > How are they normalized, to the window/opengl surface size that I have
> > passed to the aspect engine?
>
> It's normalised to the [1,1] based purely upon sensitivity rather than
> pixel
> size of the surface. The respective code is in mousecontroller.cpp, in the
> function updateMouseEvents():
>
> m_mouseState.xAxis = m_sensitivity * (e.screenPos().x() -
> m_previousPos.x());
> m_mouseState.yAxis = m_sensitivity * (m_previousPos.y() -
> e.screenPos().y());
>
> The xAxis and yAxis values are later clamped to [-1, 1].
>
> So setting the sensitivity to 0.1 means you have to move 10 pixels in a
> frame
> to get an axis value of magnitude 1.
>
> Of course once you have the axis value you can scale or transform it how
> you
> like.
>
> Cheers,
>
> Sean
>
> >
> > Kind regards.
> >
> > On Mon, Dec 14, 2015 at 3:11 PM, Sean Harmer 
> wrote:
> > > On Monday 14 Dec 2015 12:30:40 Nye wrote:
> > > > Hello,
> > > > I understood (by trial and error) that in the axisValueChanged
> signal I
> > >
> > > get
> > >
> > > > a relative offset. I incorrectly assumed it was an absolute value.
> Is it
> > > > scaled or bound somehow, in example to the screen resolution, or is
> the
> > > > value absolute (I'm using it with a mouse device)? Additionally, I'd
> > > > like
> > > > to know what is the measurement used, does it come in pixels, or some
> > > > arbitrary units?
> > >
> > > The values are normalised units [-1, 1]. How these are mapped from
> pixel
> > > offsets reported by the windowing system is controlled by the
> sensitivity
> > > property on the MouseController.
> > >
> > > Cheers,
> > >
> > > Sean
> > >
> > > --
> > > Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> > > KDAB (UK) Ltd, a KDAB Group company
> > > Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> > > Mobile: +44 (0)7545 140604
> > > KDAB - Qt Experts
>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Efficient QString construction

2015-12-15 Thread Nye
Hello,
I don't know about the "most efficient", but always have found the
following approach the most readable and easy to manage:
QString thumbPath =
QStringLiteral("%1/thumb_%2.jpg").arg(getProjectDir()).arg(basename);

Kind regards.

On Tue, Dec 15, 2015 at 12:02 PM, Julius Bullinger <
julius.bullin...@asctec.de> wrote:

> Hello,
>
>
>
> What is the currently recommended way to concatenate several QStrings
> and/or string literals? Take this code as an example:
>
>
>
> QImage img;
>
> QString getProjectDir();
>
> // ...
>
>
>
> QString basename = QFileInfo(imgPath).baseName();
>
> QString thumbPath = getProjectDir() + "/thumb_" + basename + ".jpg";
>
> img.save(thumbPath);
>
>
>
> I found several blog posts and wiki articles recommending one or multiple
> of:
>
>
>
> 1.   QStringLiteral
>
> 2.   QLatin1String
>
> 3.   QStringBuilder
>
> 4.   Simple string literals
>
>
>
> Since this may have changed over time, what do current best practices say?
>
>
>
> Best regards,
>
> Julius
>
>
>
> [1]: http://blog.qt.io/blog/2014/06/13/qt-weekly-13-qstringliteral/
>
> [1] and [2]: http://woboq.com/blog/qstringliteral.html
>
> [3:] https://wiki.qt.io/Using_QString_Effectively and
>
>
> http://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] functioning link to 5.4.2 source tar?

2015-12-15 Thread Samuel Gaist
On 15 déc. 2015, at 14:31, Roland Hughes  wrote:

> All,
> 
> Is there still a functioning link to a 5.4.2 source tar out there? Other than 
> cloning from Git I mean. If possible I would like to remain at 5.4.2 to fix 
> one little thing which requires me to build qt from source for MP4 support. I 
> could move to 5.5.1, but...requires changing a lot of existing scripts, etc.
> 
> Thanks,
> 
> --
> Roland Hughes, President
> Logikal Solutions
> 
> http://www.theminimumyouneedtoknow.com
> http://www.infiniteexposure.net
> http://www.johnsmith-book.com
> http://www.logikalblog.com
> 

Hi,

You can find it there:

http://download.qt.io/official_releases/qt/5.4/5.4.2/single/

Cheers
Samuel





signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How prevent "Code will never be executed" when compiling "qDebug() << enumvar" ?

2015-12-15 Thread Thiago Macieira
On Tuesday 15 December 2015 13:31:40 Edward Sutton wrote:
> >We have not seen this warning. What version of Xcode is this warning
> >showing
> up on?
> 
> Xcode 7.2.

I don't know what any of those switches do, so I will answer in the generic:

1) if the warning is emitted by -Wall -Wextra, we'll do our best to fix it, 
including reporting bugs to the compiler and working around if it is a false 
positive.

2) if it's not produced at -Wextra level, it's up to our discretion whether to 
fix it. We may consider it "warning too stupid" and say you shouldn't turn it 
on.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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


Re: [Interest] How prevent "Code will never be executed" when compiling "qDebug() << enumvar" ?

2015-12-15 Thread Edward Sutton

On Dec 15, 2015, at 3:31 AM, Thiago Macieira 
> wrote:

On Monday 14 December 2015 21:44:47 Edward Sutton wrote:
#ifdef QT_DEBUG // Fix iOS Clang warning "Code will never be executed"

qDebug() << "TapAndHoldGesture: " << tapAndHold->state();

#endif

>We have not seen this warning. What version of Xcode is this warning showing
up on?

Xcode 7.2.

In an attempt to reduce Xcode's nagging to accept it’s *many* recommended 
project settings, I have the following warning flags added to my qmake project. 
 There are still another half-dozen recommended project settings that I have 
not figured out what the associated flags are.

The issue only shows up in release build.  The following warnings are added to 
my qmake project for all builds.


# Silence warnings on OSX ( I do not get these on the OSX build VM? Same 
XCode 6.4? )

# qobject.h:108: warning: unknown warning group 
'-Winconsistent-missing-override', ignored [-Wunknown-pragmas]

QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas


Q_CLANG_WARN_BOOL_CONVERSION.name = CLANG_WARN_BOOL_CONVERSION

Q_CLANG_WARN_BOOL_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_BOOL_CONVERSION


Q_CLANG_WARN_CONSTANT_CONVERSION.name = CLANG_WARN_CONSTANT_CONVERSION

Q_CLANG_WARN_CONSTANT_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_CONSTANT_CONVERSION


Q_CLANG_WARN_EMPTY_BODY.name = CLANG_WARN_EMPTY_BODY

Q_CLANG_WARN_EMPTY_BODY.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_EMPTY_BODY


Q_CLANG_WARN_ENUM_CONVERSION.name = CLANG_WARN_ENUM_CONVERSION

Q_CLANG_WARN_ENUM_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_ENUM_CONVERSION


Q_CLANG_WARN_INT_CONVERSION.name = CLANG_WARN_INT_CONVERSION

Q_CLANG_WARN_INT_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_INT_CONVERSION


Q_CLANG_WARN_UNREACHABLE_CODE.name = CLANG_WARN_UNREACHABLE_CODE

Q_CLANG_WARN_UNREACHABLE_CODE.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_UNREACHABLE_CODE


Q_CLANG_WARN__DUPLICATE_METHOD_MATCH.name = 
CLANG_WARN__DUPLICATE_METHOD_MATCH

Q_CLANG_WARN__DUPLICATE_METHOD_MATCH.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN__DUPLICATE_METHOD_MATCH


Q_ENABLE_STRICT_OBJC_MSGSEND.name = ENABLE_STRICT_OBJC_MSGSEND

Q_ENABLE_STRICT_OBJC_MSGSEND.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_STRICT_OBJC_MSGSEND


Q_GCC_NO_COMMON_BLOCKS.name = GCC_NO_COMMON_BLOCKS

Q_GCC_NO_COMMON_BLOCKS.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_NO_COMMON_BLOCKS


Q_GCC_WARN_64_TO_32_BIT_CONVERSION.name = GCC_WARN_64_TO_32_BIT_CONVERSION

Q_GCC_WARN_64_TO_32_BIT_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_64_TO_32_BIT_CONVERSION


Q_GCC_WARN_ABOUT_RETURN_TYPE.name = GCC_WARN_ABOUT_RETURN_TYPE

Q_GCC_WARN_ABOUT_RETURN_TYPE.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_ABOUT_RETURN_TYPE


Q_GCC_WARN_UNDECLARED_SELECTOR.name = GCC_WARN_UNDECLARED_SELECTOR

Q_GCC_WARN_UNDECLARED_SELECTOR.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNDECLARED_SELECTOR


Q_GCC_WARN_UNINITIALIZED_AUTOS.name = GCC_WARN_UNINITIALIZED_AUTOS

Q_GCC_WARN_UNINITIALIZED_AUTOS.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNINITIALIZED_AUTOS


Q_GCC_WARN_UNUSED_FUNCTION.name = GCC_WARN_UNUSED_FUNCTION

Q_GCC_WARN_UNUSED_FUNCTION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNUSED_FUNCTION


Q_GCC_WARN_UNUSED_VARIABLE.name = GCC_WARN_UNUSED_VARIABLE

Q_GCC_WARN_UNUSED_VARIABLE.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNUSED_VARIABLE


Example:

Users/edward3/Documents/projects/build-tsr-iphoneos_clang_Qt_5_5_1_for_iOS_1-Release/obj/TSR.build/Release-iphoneos/TSR.build/Objects-normal/armv7/trackerconnection.o
/Users/edward3/Documents/projects/tsr-mobile-fileput/source/trackerconnection.cpp:219:18:
 error: code will never be executed [-Werror,-Wunreachable-code]

qDebug() << this->d_ptr->trackerFileSend.state();
^~
/Users/edward3/Documents/projects/tsr-mobile-fileput/source/trackerconnection.cpp:209:52:
 error: code will never be executed [-Werror,-Wunreachable-code]

qDebug() << "TrackerConnection::TrackerState:" << d_ptr->trackerState;
^~
2 errors generated.


-Ed




--
Thiago Macieira - thiago.macieira (AT) intel.com
 Software Architect - Intel Open Source Technology Center

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

This email and any files transmitted with it from The Charles Machine Works, 
Inc. are confidential and intended solely for the use of the individual or 
entity to which they are addressed. If you have received this email in error 
please notify the sender. Our company accepts no 

[Interest] functioning link to 5.4.2 source tar?

2015-12-15 Thread Roland Hughes

All,

Is there still a functioning link to a 5.4.2 source tar out there? Other 
than cloning from Git I mean. If possible I would like to remain at 
5.4.2 to fix one little thing which requires me to build qt from source 
for MP4 support. I could move to 5.5.1, but...requires changing a lot of 
existing scripts, etc.


Thanks,

--
Roland Hughes, President
Logikal Solutions

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com

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


Re: [Interest] Efficient QString construction

2015-12-15 Thread Thiago Macieira
On Tuesday 15 December 2015 10:02:09 Julius Bullinger wrote:
> Hello,
> 
> What is the currently recommended way to concatenate several QStrings and/or
> string literals? Take this code as an example:

Using the fast operator +.

DEFINES += QT_USE_FAST_OPERATOR_PLUS

> QString basename = QFileInfo(imgPath).baseName();
> 
> QString thumbPath = getProjectDir() + "/thumb_" + basename + ".jpg";
> 
> img.save(thumbPath);
> 
> 
> I found several blog posts and wiki articles recommending one or multiple
> of:
> 
> 
> 1.   QStringLiteral

QStringLiteral is to be used when you want to actually use the literal as the 
whole string. That's not the case here.

> 2.   QLatin1String

You should use QLatin1String whenever there's an overload that takes a 
QLatin1String. You'd need here it if you compiled with QT_NO_CAST_FROM_ASCII.

> 3.   QStringBuilder

This is the fast operator+.

> 4.   Simple string literals

This is the slowest.

> Since this may have changed over time, what do current best practices say?

The same as they've always said.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

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


Re: [Interest] How prevent "Code will never be executed" when compiling "qDebug() << enumvar" ?

2015-12-15 Thread Edward Sutton
This hides the unreachable code warning from the compiler.  Although almost as 
ugly as hiding it by wrapping inside "#ifdef QT_DEBUG”


QString enumValue;

QDebug() << this->d_ptr->trackerFileSend.state();

qDebug("%s", enumValue.toLatin1().data());

-Ed


On Dec 15, 2015, at 7:31 AM, Edward Sutton 
> wrote:


On Dec 15, 2015, at 3:31 AM, Thiago Macieira 
> wrote:

On Monday 14 December 2015 21:44:47 Edward Sutton wrote:
#ifdef QT_DEBUG // Fix iOS Clang warning "Code will never be executed"

qDebug() << "TapAndHoldGesture: " << tapAndHold->state();

#endif

>We have not seen this warning. What version of Xcode is this warning showing
up on?

Xcode 7.2.

In an attempt to reduce Xcode's nagging to accept it’s *many* recommended 
project settings, I have the following warning flags added to my qmake project. 
 There are still another half-dozen recommended project settings that I have 
not figured out what the associated flags are.

The issue only shows up in release build.  The following warnings are added to 
my qmake project for all builds.


# Silence warnings on OSX ( I do not get these on the OSX build VM? Same 
XCode 6.4? )

# qobject.h:108: warning: unknown warning group 
'-Winconsistent-missing-override', ignored [-Wunknown-pragmas]

QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas


Q_CLANG_WARN_BOOL_CONVERSION.name = CLANG_WARN_BOOL_CONVERSION

Q_CLANG_WARN_BOOL_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_BOOL_CONVERSION


Q_CLANG_WARN_CONSTANT_CONVERSION.name = CLANG_WARN_CONSTANT_CONVERSION

Q_CLANG_WARN_CONSTANT_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_CONSTANT_CONVERSION


Q_CLANG_WARN_EMPTY_BODY.name = CLANG_WARN_EMPTY_BODY

Q_CLANG_WARN_EMPTY_BODY.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_EMPTY_BODY


Q_CLANG_WARN_ENUM_CONVERSION.name = CLANG_WARN_ENUM_CONVERSION

Q_CLANG_WARN_ENUM_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_ENUM_CONVERSION


Q_CLANG_WARN_INT_CONVERSION.name = CLANG_WARN_INT_CONVERSION

Q_CLANG_WARN_INT_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_INT_CONVERSION


Q_CLANG_WARN_UNREACHABLE_CODE.name = CLANG_WARN_UNREACHABLE_CODE

Q_CLANG_WARN_UNREACHABLE_CODE.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN_UNREACHABLE_CODE


Q_CLANG_WARN__DUPLICATE_METHOD_MATCH.name = 
CLANG_WARN__DUPLICATE_METHOD_MATCH

Q_CLANG_WARN__DUPLICATE_METHOD_MATCH.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_CLANG_WARN__DUPLICATE_METHOD_MATCH


Q_ENABLE_STRICT_OBJC_MSGSEND.name = ENABLE_STRICT_OBJC_MSGSEND

Q_ENABLE_STRICT_OBJC_MSGSEND.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_STRICT_OBJC_MSGSEND


Q_GCC_NO_COMMON_BLOCKS.name = GCC_NO_COMMON_BLOCKS

Q_GCC_NO_COMMON_BLOCKS.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_NO_COMMON_BLOCKS


Q_GCC_WARN_64_TO_32_BIT_CONVERSION.name = GCC_WARN_64_TO_32_BIT_CONVERSION

Q_GCC_WARN_64_TO_32_BIT_CONVERSION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_64_TO_32_BIT_CONVERSION


Q_GCC_WARN_ABOUT_RETURN_TYPE.name = GCC_WARN_ABOUT_RETURN_TYPE

Q_GCC_WARN_ABOUT_RETURN_TYPE.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_ABOUT_RETURN_TYPE


Q_GCC_WARN_UNDECLARED_SELECTOR.name = GCC_WARN_UNDECLARED_SELECTOR

Q_GCC_WARN_UNDECLARED_SELECTOR.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNDECLARED_SELECTOR


Q_GCC_WARN_UNINITIALIZED_AUTOS.name = GCC_WARN_UNINITIALIZED_AUTOS

Q_GCC_WARN_UNINITIALIZED_AUTOS.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNINITIALIZED_AUTOS


Q_GCC_WARN_UNUSED_FUNCTION.name = GCC_WARN_UNUSED_FUNCTION

Q_GCC_WARN_UNUSED_FUNCTION.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNUSED_FUNCTION


Q_GCC_WARN_UNUSED_VARIABLE.name = GCC_WARN_UNUSED_VARIABLE

Q_GCC_WARN_UNUSED_VARIABLE.value = YES

QMAKE_MAC_XCODE_SETTINGS += Q_GCC_WARN_UNUSED_VARIABLE


Example:

Users/edward3/Documents/projects/build-tsr-iphoneos_clang_Qt_5_5_1_for_iOS_1-Release/obj/TSR.build/Release-iphoneos/TSR.build/Objects-normal/armv7/trackerconnection.o
/Users/edward3/Documents/projects/tsr-mobile-fileput/source/trackerconnection.cpp:219:18:
 error: code will never be executed [-Werror,-Wunreachable-code]

qDebug() << this->d_ptr->trackerFileSend.state();
^~
/Users/edward3/Documents/projects/tsr-mobile-fileput/source/trackerconnection.cpp:209:52:
 error: code will never be executed [-Werror,-Wunreachable-code]

qDebug() << "TrackerConnection::TrackerState:" << d_ptr->trackerState;
^~
2 errors generated.


-Ed




--
Thiago Macieira - thiago.macieira (AT) intel.com
 Software Architect - Intel Open Source Technology Center

___
Interest mailing list

[Interest] Qt/QML fullscreen app not visible through Teamviewer on Windows

2015-12-15 Thread Cornelius Hald
Hi!

I've got a Qt/QML app running in fullscreen. Unfortunately I've noticed
that the app is not visible through Teamviewer which I'd like to use
for remote access.

This issue does only occurs if the app runs on Windows. On Linux
everything is fine.

Through Teamviewer I can see the target desktop as if the app would be
completely transparent.

Once I switch the app from fullscreen to windowed mode it is correctly
transmitted. So it looks like there are some optimizations turned on
once the app runs in fullscreen mode.

I'm using Qt 5.5.1 on Windows 7 but the issue is visible with Qt 5.5.0
as well. With older Qt (I think 5.3.x) I didn't have this problem.

The only way I've found is to force the app to use ANGLE by setting:
app.setAttribute(Qt::AA_UseOpenGLES);

Unfortunately this brings up some graphical glitches and performance
issues.

Is anyone aware of a potential solution? Hints and pointers would be
welcome as well.

Thanks!
Conny
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt iOS & 3D Touch

2015-12-15 Thread Nuno Santos
Hi,

Is support for iOS 3D touch planned for Qt 5.6?

Nuno Santos
Founder / CEO / CTO
www.imaginando.pt
+351 91 621 69 62

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


Re: [Interest] Fonts and Qt5

2015-12-15 Thread Duane

On 15/12/2015 4:30 AM, Thiago Macieira wrote:

On Monday 14 December 2015 23:56:30 Frank Mertens wrote:

2 ideas, here:
   * call QGuiApplication::setFont() in your main()
   * use qtconfig to setup Qt5 defaults


There's no qtconfig for Qt 5.

Recommendation: don't do anything. Qt is supposed to select the best font for
you based on system defaults. Don't override it.

If you think there's something wrong with the font it selected, that's a
different story.




Thanks for the replies.

That's that issue though.  We were not setting an application font. 
With Qt 4 the font sizes were ok.  With Qt 5 the same code made the 
fonts very small.


What I see is that when I don't set the family, it has Sans Serif as the 
family and the default size is 9.  When I set the font to DejaVu which 
exists, the point size is 12.  Doing some math, it actually sounds like 
9 would be very small.  This doesn't make a lot of sense.


I use this to test:

  QFont f(QApplication::font());
  qDebug()<< qPrintable(f.family()) << f.pointSize());
  QApplication::setFont(QFont("DejaVu"));
  f=QApplication::font();
  qDebug()<< qPrintable(f.family()) << f.pointSize());


What I don't understand is why the point size would be different.

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


Re: [Interest] New CI for Qt (and OpenSource Qt/QtC 3rd parties)

2015-12-15 Thread Bo Thorsen

Den 11-12-2015 kl. 09:16 skrev Sarajärvi Tony:

> I cannot find any reference to "Coin CI".  Is this an open source or 
commercial tool?  A Qt internal tool?

Internal tool created from nothing. Sources aren't public as of yet anyway


I'd like to see that done. I'm also interested in hearing about why you 
chose to do this, as there are so many CI systems available already.


My guess is that this is because you want a system that can create 
virtual machines on the fly? I'd be interested in getting such a system 
set up for our own build server. So you could have your first 
contributor soon :)


Bo Thorsen,
Director, Viking Software.

--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How prevent "Code will never be executed" when compiling "qDebug() << enumvar" ?

2015-12-15 Thread Koehne Kai
> -Original Message-
> From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of
> Edward Sutton
> Sent: Monday, December 14, 2015 10:45 PM
> To: Qt Interest 
> Subject: [Interest] How prevent "Code will never be executed" when
> compiling "qDebug() << enumvar" ?
> 
> #ifdef QT_DEBUG // Fix iOS Clang warning "Code will never be executed"
> 
> qDebug() << "TapAndHoldGesture: " << tapAndHold->state();
> 
> #endif

Just an idea, but maybe you can try using categorized logging?

QLoggingCategory defaultC("default");

qCDebug(defaultC) << "TapAndHoldGesture: " << tapAndHold->state();

Regards

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


Re: [Interest] New CI for Qt (and OpenSource Qt/QtC 3rd parties)

2015-12-15 Thread Fathi Boudra
On Tue, Dec 15, 2015 at 4:27 PM, Bo Thorsen  wrote:
> Den 11-12-2015 kl. 09:16 skrev Sarajärvi Tony:
>>
>> > I cannot find any reference to "Coin CI".  Is this an open
>> source or commercial tool?  A Qt internal tool?
>>
>> Internal tool created from nothing. Sources aren't public as of yet anyway
>
>
> I'd like to see that done. I'm also interested in hearing about why you
> chose to do this, as there are so many CI systems available already.
>
> My guess is that this is because you want a system that can create virtual
> machines on the fly? I'd be interested in getting such a system set up for
> our own build server. So you could have your first contributor soon :)

btw, you can achieve the same with Jenkins and Docker. Jenkins has a
docker plugin, which can spawn ephemeral or persistent docker build
slaves (very similar to EC2 slave if you're familiar with it). Puppet
isn't required in this setup as you can use Dockerfiles to maintain
the virtual machines. Another interesting project that you might find
useful is Jenkins Job Builder from OpenStack infra folks. It allows to
write the Jenkins jobs in yaml (human readable) and store them as
plain text in your favorite SCM like git.

Cheers.

> Bo Thorsen,
> Director, Viking Software.
>
> --
> Viking Software
> Qt and C++ developers for hire
> http://www.vikingsoft.eu
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Fonts and Qt5

2015-12-15 Thread Duane

On 15/12/2015 9:16 AM, Duane wrote:

On 15/12/2015 4:30 AM, Thiago Macieira wrote:

On Monday 14 December 2015 23:56:30 Frank Mertens wrote:

2 ideas, here:
   * call QGuiApplication::setFont() in your main()
   * use qtconfig to setup Qt5 defaults


There's no qtconfig for Qt 5.

Recommendation: don't do anything. Qt is supposed to select the best
font for
you based on system defaults. Don't override it.

If you think there's something wrong with the font it selected, that's a
different story.




Thanks for the replies.

That's that issue though.  We were not setting an application font. With
Qt 4 the font sizes were ok.  With Qt 5 the same code made the fonts
very small.

What I see is that when I don't set the family, it has Sans Serif as the
family and the default size is 9.  When I set the font to DejaVu which
exists, the point size is 12.  Doing some math, it actually sounds like
9 would be very small.  This doesn't make a lot of sense.

I use this to test:

   QFont f(QApplication::font());
   qDebug()<< qPrintable(f.family()) << f.pointSize());
   QApplication::setFont(QFont("DejaVu"));
   f=QApplication::font();
   qDebug()<< qPrintable(f.family()) << f.pointSize());


What I don't understand is why the point size would be different.



Sorry forgot to put the output.
Sans Serif 9
DejaVu 12



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


Re: [Interest] Qt3D offscreen rendering

2015-12-15 Thread Harald Vistnes
I've been trying to adjust the code in scene3ditem.cpp. But I am having
some problems. The first parts of my code

QSurfaceFormat format;

format.setVersion(4, 3);

format.setProfile(QSurfaceFormat::CoreProfile);

format.setDepthBufferSize( 24 );

format.setSamples( 4 );

format.setStencilBufferSize(8);


QOpenGLContext *context = new QOpenGLContext;

context->setFormat(format);

context->create();


QOffscreenSurface *surface = new QOffscreenSurface;

surface->setFormat(format);

surface->create();


context->makeCurrent(surface);


Qt3DRender::QRenderAspect *renderAspect = new
Qt3DRender::QRenderAspect(Qt3DRender::QRenderAspect::Synchronous);


Qt3DCore::QAspectEngine *engine = new Qt3DCore::QAspectEngine;

engine->registerAspect(renderAspect);

engine->initialize();


QVariantMap data;

data.insert(QStringLiteral("surface"),
QVariant::fromValue(static_cast(surface)));

data.insert(QStringLiteral("eventSource"), QVariant::fromValue(surface));

engine->setData(data);


renderAspect->renderInitialize(context);


crashes at the call to renderInitialize(). I've traced the crash to
Qt3DRender::Renderer::Renderer::initialize() (renderer.cpp line 324):
m_surface->format(). m_surface is NULL at that point because in
QRenderAspectPrivate::setSurface() hasPlatformSurface is false and so
m_renderer->setSurface() is never called on qrenderaspect.cpp line
212.


Is anything wrong in my code?


Thanks,


Harald



2015-12-14 21:57 GMT+01:00 Harald Vistnes :

> Perfect.
>
> Thanks,
> Harald
> On Dec 14, 2015 9:17 PM, "Sean Harmer"  wrote:
>
>> Hi,
>>
>> that's pretty much exactly what the implementation of Scene3D does:
>>
>> http://code.qt.io/cgit/qt/qt3d.git/tree/src/quick3d/imports/scene3d
>>
>> Cheers,
>>
>> Sean
>>
>> On 14/12/2015 20:06, Harald Vistnes wrote:
>>
>> Hi,
>>
>> I'm trying to do offscreen rendering with Qt3D, but I have not figured
>> out how to do it yet. I have two use cases for this. One is to render a
>> single image in a console application, the other is to have a desktop
>> application with a 3D window and a button to save the current view in a
>> user specified resolution.
>>
>> I'm guessing I should use a subclass of QOffscreenSurface instead of
>> QWindow as the surface, is that right? Or should I pass a custom render
>> target to the render target selector in the frame graph?
>>
>> But how can I make Qt3D render a single frame, and how can I get the
>> rendered image back? In QOpenGLFrameBufferObject there are toImage()
>> functions, but there are no such functions in Qt3DRender::QRenderTarget. Is
>> there a way to do this, or have this functionality not been implemented yet?
>>
>> Any hints on how to proceed would be welcome.
>>
>> Harald
>>
>>
>> ___
>> Interest mailing 
>> listInterest@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest