Mac: Fix compilation with -qtnamespace set
Change-Id: Id3b9f4e3edf2caeac32c8a44278cdf05a1fc70fb Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>bb10
parent
eb60e93d34
commit
ef63b7befd
|
|
@ -44,6 +44,8 @@
|
|||
#include <QtCore/QSettings>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// this could become a list of all languages used for each writing
|
||||
// system, instead of using the single most common language.
|
||||
static const char *languageForWritingSystem[] = {
|
||||
|
|
@ -320,6 +322,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString family, cons
|
|||
return fallbackLists[styleHint];
|
||||
}
|
||||
|
||||
OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref);
|
||||
QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
|
||||
{
|
||||
ATSFontContainerRef fontContainer;
|
||||
|
|
@ -330,7 +333,6 @@ QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData
|
|||
kATSFontContextLocal, kATSFontFormatUnspecified, NULL,
|
||||
kATSOptionFlagsDefault, &fontContainer);
|
||||
} else {
|
||||
OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref);
|
||||
FSRef ref;
|
||||
if (qt_mac_create_fsref(fileName, &ref) != noErr)
|
||||
return QStringList();
|
||||
|
|
@ -371,3 +373,5 @@ QFont QCoreTextFontDatabase::defaultFont() const
|
|||
return QFont(defaultFontName);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
|
||||
#include <QPlatformFontDatabase>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QCoreTextFontDatabase : public QPlatformFontDatabase
|
||||
{
|
||||
public:
|
||||
|
|
@ -61,4 +63,6 @@ private:
|
|||
QHash<QFont::StyleHint, QStringList> fallbackLists;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCORETEXTFONTDATABASE_H
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@
|
|||
#include <QtGui/QImage>
|
||||
#include <QtGui/QAccessible>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QCocoaWindow;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@interface QNSView : NSView {
|
||||
CGImageRef m_cgImage;
|
||||
QWindow *m_window;
|
||||
|
|
|
|||
|
|
@ -2105,7 +2105,7 @@ void QMacStyle::unpolish(QWidget* w)
|
|||
}
|
||||
}
|
||||
|
||||
if (QRubberBand *rubber = ::qobject_cast<QRubberBand*>(w)) {
|
||||
if (QRubberBand *rubber = qobject_cast<QRubberBand*>(w)) {
|
||||
rubber->setWindowOpacity(1.0);
|
||||
rubber->setAttribute(Qt::WA_PaintOnScreen, true);
|
||||
rubber->setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
|
|
@ -3538,7 +3538,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
QCommonStyle::drawControl(ce, opt, p, w);
|
||||
break;
|
||||
case CE_PushButtonBevel:
|
||||
if (const QStyleOptionButton *btn = ::qstyleoption_cast<const QStyleOptionButton *>(opt)) {
|
||||
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
|
||||
if (!(btn->state & (State_Raised | State_Sunken | State_On)))
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -1018,10 +1018,15 @@ void tst_QToolBar::widgetAction()
|
|||
delete a;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QT_BEGIN_NAMESPACE
|
||||
extern void qt_set_sequence_auto_mnemonic(bool b);
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
void tst_QToolBar::accel()
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
extern void qt_set_sequence_auto_mnemonic(bool b);
|
||||
qt_set_sequence_auto_mnemonic(true);
|
||||
#endif
|
||||
QMainWindow mw;
|
||||
|
|
|
|||
Loading…
Reference in New Issue