Re: [Development] Mac app built with Qt5.3.0 RC got rejected by Mac App Store because of non-public API calls.

2014-05-17 Thread P Bai
Unfortunately the workaround described here 
https://bugreports.qt-project.org/browse/QTBUG-31419 did not work with 
Qt5.3.0RC. I could not get it compiled after the patch. I have to use Qt5.3 
because it fixed a serious sandbox bug. 

Is there any way to completely disable usage of QML/QtQuick/Webkit2 stuff? My 
mac app only uses QWebView in pure C++. If that's possible I think I would be 
all set.

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


[Development] Mac app built with Qt5.3.0 RC got rejected by Mac App Store because of non-public API calls.

2014-05-14 Thread P Bai
Hi All,

My mac app just got rejected by the Mac App Store for the following reasons:


The use of non-public APIs can lead to a poor user experience should these APIs 
change in the future, and is therefore not permitted. The following non-public 
APIs are included in your application:

'/usr/lib/libSystem.B.dylib'
: bootstrap_look_up2
: bootstrap_register2

'/usr/lib/libicucore.A.dylib'
: ubrk_getRuleStatus
: ubrk_setUText
: ucnv_getCanonicalName
: ucnv_reset

'/usr/lib/libiodbc.2.dylib'
: SQLAllocHandle
: SQLBindParameter
: SQLCloseCursor
: SQLColAttributeW
: SQLColumnsW
: SQLDescribeColW
: SQLDisconnect
: SQLDriverConnectW
: SQLEndTran
: SQLExecDirectW
: SQLExecute
: SQLFetch
: SQLFetchScroll
: SQLFreeHandle
: SQLGetData
: SQLGetDiagRecW
: SQLGetFunctions
: SQLGetInfoW
: SQLGetStmtAttrW
: SQLGetTypeInfoW
: SQLMoreResults
: SQLNumResultCols
: SQLPrepareW
: SQLPrimaryKeysW
: SQLRowCount
: SQLSetConnectAttrW
: SQLSetEnvAttr
: SQLSetStmtAttrW
: SQLSpecialColumnsW
: SQLTablesW
--

First of all, my app doesn't even use SQL, why are those APIs being called? As 
to the first two issues, from what I read online, it is because of QtWebkit, 
which I have to use in my app. Is there any hope we could get these fixed? 

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


Re: [Development] Retina display support

2012-09-24 Thread P Bai
Thank you, Morten. So will QPixmap/QImage handle hiDPI automatically? I mean, 
for example, how does it handle resize? If I load an image file as QImage, and 
then resize it so that I can draw in a QRect, will the resized QImage actually 
have 2x resolution in HiDPI mode? Also I still will be able to directly access 
the pixel data in HiDPI mode, right?


And of course when do you think we can expect a working patch?:-) I can't wait 
to make my application retina ready!


Thank you again,
P




- Original Message -
From: Sorvig Morten morten.sor...@digia.com
To: development@qt-project.org development@qt-project.org
Cc: 
Sent: Monday, September 24, 2012 6:02 AM
Subject: Re: [Development] Retina display support


On 21 Sep 2012, at 15:30, P Bai ap...@yahoo.com
wrote:

 Thank you, Eike. From what I read in the codereview, a function to get the 
 scale factor qt_mac_get_scalefactor() is available as a patch, but 
 QPixmap/QImage HiDPI support is still a WIP. Does that mean even if I were 
 able to detect HiDPI mode, I still can't do anything until QPixmap/QImage 
 support becomes available. Is that right?

The patches are still not ready, but I can give you an idea of how it's going 
to work:

As you know there is a point/pixel split. Screen/window/widget/event geometry 
is in points. QPixmap and QImage sizes are in pixels. On high-dpi screens there 
is a 1:2 mapping between points and pixels - point geometry does not change. 
You can mostly keep working in points as before and ignore the scale factor, 
except when dealing with raster graphics.

There will be a (public) function for accessing the scale factor, most likely 
qt_mac_get_scalefactor() in Qt 4 and perhaps a QScreen/QWindow property in Qt 
5. I say perhaps because it's complicated: get_scalefactor needs to know the 
screen in question, but we don't always have that information in Qt (for 
example deep in style code).

For QPixmap/QImage my current approach is to add a dpiScaleFactor property to 
both classes, which is typically set to 2.0 to indicate high-dpi raster 
content. I've experimented with adopting the @2x file name convention when 
loading images from files, this seems to work well. QIcon::pixmap() will also 
be modified to produce a high-dpi pixmap when appropriate. 

The plan is that Qt 4 will support painting OF high-dpi images to screen, and 
that Qt 5 will (in addition) support painting ON high-dpi images using a scaled 
painter. The latter is required since Qt 5 uses the raster graphics system.

There is one behaviour change to be aware of: With the addition of 
dpiScaleFactor it is now an error to calculate layouts directly from pixmap and 
image sizes. The correct way is to divide the size by the scale factor. For 
example, a 2x 64x64 pixmap should be 32x32 points on screen. This is a 
behaviour change wich has the potential to break user code, so I think we'll 
need to have an opt-in mechanism here.

For OpenGL you can request a 2x pixel buffer by setting a flag. Qt should 
provide a similar option to apps.

- Morten




___
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] Retina display support

2012-09-21 Thread P Bai
Thank you, Eike. From what I read in the codereview, a function to get the 
scale factor qt_mac_get_scalefactor() is available as a patch, but 
QPixmap/QImage HiDPI support is still a WIP. Does that mean even if I were able 
to detect HiDPI mode, I still can't do anything until QPixmap/QImage support 
becomes available. Is that right?

Thank you again!
P


- Original Message -
From: Ziller Eike eike.zil...@digia.com
To: Kai-Uwe Behrmann k...@gmx.de
Cc: P Bai ap...@yahoo.com; development@qt-project.org 
development@qt-project.org
Sent: Friday, September 21, 2012 4:37 AM
Subject: Re: [Development] Retina display support


On 21 Sep 2012, at 07:12, Kai-Uwe Behrmann k...@gmx.de wrote:

 Am 20.09.12, 19:09 -0700 schrieb P Bai:
 I have a few questions about how to add retina display support to my 
 application. I understand by reading an earlier discuss that you can add a 
 few lines in the info.plist to enable HiDPI render. That would only work for 
 text and standard widgets, right?

Right.

 How about icons and pixmaps? How do I detect if the application is running 
 in HiDPI mode?

At the moment only through platform API, e.g. UIScreen scale

 For example if I write an image viewer program, how do I know when to draw a 
 high resolution image? I guess I can just always force draw the high-res 
 image to the rect of a regular sized image,

I don't think that would work atm. Afaik Qt doesn't draw at sub-point 
coordinates as is and would downscale your high-res image to the point size of 
the rectangle. (See below for an explanation what I mean with that.)

Morten Sørvig is working on a solution for the HiDPI issue, a (probably 
outdated) experiment is on https://codereview.qt-project.org/33266

 but that would be a huge waste of system resource and performance drag when 
 running on non-retina system. Are there any better solutions?
 
 Aren't you seeing the window size in pixels as usual? With that available, 
 you would have a generic answere for your kind of question.

Well, no. Pixel in the Qt world atm means something different than pixel in 
the physical world (when talking about Cocoa / Mac).
The integer coordinates in Qt actually are mapped to what Cocoa calls points 
which is referring to logical coordinate space, not device coordinate space.
A HiDPI screen has the same number of points as a corresponding non-HiDPI 
screen, but it has a scale (of 2). Applications see the same number of points 
when they run on a HiDPI screen as they would on a non-HiDPI screen (-- 
everything has exactly the same physical dimensions when running on different 
screens).
That means that Qt also reports the same dimensions. Rastering for pixmaps is 
also done based on points.

-- 
Eike Ziller
Senior Software Engineer

Digia Germany GmbH
Rudower Chausse 13, 12489 D-Berlin
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B,  
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Email: eike.zil...@digia.com
Tel: +49 30 63 92 32 55

Digia Germany is a group company of Digia Plc,
Valimotie 21, FI-00380 Helsinki Finland
Visit us at: www.digia.com
--
PRIVACY AND CONFIDENTIALITY NOTICE
This message and any attachments are intended only for use by the named 
addressee and may contain privileged and/or confidential information. If you 
are not the named addressee you should not disseminate, copy or take any action 
in reliance on it. If you have received this message in error, please contact 
the sender immediately and delete the message and any attachments accompanying 
it. Digia Germany GmbH and Digia Plc do not accept liability for any 
corruption, interception, amendment, tampering or viruses occurring to this 
message.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Retina display support

2012-09-20 Thread P Bai
Hi all,

I have a few questions about how to add retina display support to my 
application. I understand by reading an earlier discuss that you can add a few 
lines in the info.plist to enable HiDPI render. That would only work for text 
and standard widgets, right? How about icons and pixmaps? How do I detect if 
the application is running in HiDPI mode? For example if I write an image 
viewer program, how do I know when to draw a high resolution image? I guess I 
can just always force draw the high-res image to the rect of a regular sized 
image, but that would be a huge waste of system resource and performance drag 
when running on non-retina system. Are there any better solutions?

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