QtBase: remove explicit function info from qWarning() etc
This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
a4ecd5f1b3
commit
40a8302115
@ -350,7 +350,7 @@ struct QCoreApplicationData {
|
|||||||
|
|
||||||
QFile metafile(QStringLiteral("app/META-INF/MANIFEST.MF"));
|
QFile metafile(QStringLiteral("app/META-INF/MANIFEST.MF"));
|
||||||
if (!metafile.open(QIODevice::ReadOnly)) {
|
if (!metafile.open(QIODevice::ReadOnly)) {
|
||||||
qWarning() << Q_FUNC_INFO << "Could not open application metafile for reading";
|
qWarning("Could not open application metafile for reading")
|
||||||
} else {
|
} else {
|
||||||
while (!metafile.atEnd() && (application.isEmpty() || applicationVersion.isEmpty() || orgName.isEmpty())) {
|
while (!metafile.atEnd() && (application.isEmpty() || applicationVersion.isEmpty() || orgName.isEmpty())) {
|
||||||
QByteArray line = metafile.readLine();
|
QByteArray line = metafile.readLine();
|
||||||
|
@ -102,7 +102,7 @@ static int bpsUnblockDomain = -1;
|
|||||||
|
|
||||||
static int bpsIOHandler(int fd, int io_events, void *data)
|
static int bpsIOHandler(int fd, int io_events, void *data)
|
||||||
{
|
{
|
||||||
qEventDispatcherDebug << Q_FUNC_INFO;
|
qEventDispatcherDebug;
|
||||||
// decode callback payload
|
// decode callback payload
|
||||||
bpsIOHandlerData *ioData = static_cast<bpsIOHandlerData*>(data);
|
bpsIOHandlerData *ioData = static_cast<bpsIOHandlerData*>(data);
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ void QEventDispatcherBlackberry::registerSocketNotifier(QSocketNotifier *notifie
|
|||||||
int sockfd = notifier->socket();
|
int sockfd = notifier->socket();
|
||||||
int type = notifier->type();
|
int type = notifier->type();
|
||||||
|
|
||||||
qEventDispatcherDebug << Q_FUNC_INFO << "fd =" << sockfd;
|
qEventDispatcherDebug << "fd =" << sockfd;
|
||||||
|
|
||||||
if (Q_UNLIKELY(sockfd >= FD_SETSIZE)) {
|
if (Q_UNLIKELY(sockfd >= FD_SETSIZE)) {
|
||||||
qWarning() << "QEventDispatcherBlackberry: cannot register QSocketNotifier (fd too high)"
|
qWarning() << "QEventDispatcherBlackberry: cannot register QSocketNotifier (fd too high)"
|
||||||
@ -267,7 +267,7 @@ void QEventDispatcherBlackberry::unregisterSocketNotifier(QSocketNotifier *notif
|
|||||||
|
|
||||||
int sockfd = notifier->socket();
|
int sockfd = notifier->socket();
|
||||||
|
|
||||||
qEventDispatcherDebug << Q_FUNC_INFO << "fd =" << sockfd;
|
qEventDispatcherDebug << "fd =" << sockfd;
|
||||||
|
|
||||||
if (Q_UNLIKELY(sockfd >= FD_SETSIZE)) {
|
if (Q_UNLIKELY(sockfd >= FD_SETSIZE)) {
|
||||||
qWarning() << "QEventDispatcherBlackberry: cannot unregister QSocketNotifier" << sockfd;
|
qWarning() << "QEventDispatcherBlackberry: cannot unregister QSocketNotifier" << sockfd;
|
||||||
|
@ -513,7 +513,7 @@ QWindowsMessageWindowClassContext::QWindowsMessageWindowClassContext()
|
|||||||
wc.lpszClassName = className;
|
wc.lpszClassName = className;
|
||||||
atom = RegisterClass(&wc);
|
atom = RegisterClass(&wc);
|
||||||
if (!atom) {
|
if (!atom) {
|
||||||
qErrnoWarning("%s: RegisterClass() failed", Q_FUNC_INFO, qPrintable(qClassName));
|
qErrnoWarning("%s RegisterClass() failed", qPrintable(qClassName));
|
||||||
delete [] className;
|
delete [] className;
|
||||||
className = 0;
|
className = 0;
|
||||||
}
|
}
|
||||||
@ -549,7 +549,7 @@ static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatch
|
|||||||
0); // windows creation data.
|
0); // windows creation data.
|
||||||
|
|
||||||
if (!wnd) {
|
if (!wnd) {
|
||||||
qErrnoWarning("%s: CreateWindow() for QEventDispatcherWin32 internal window failed", Q_FUNC_INFO);
|
qErrnoWarning("CreateWindow() for QEventDispatcherWin32 internal window failed");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ void QMimeXMLProvider::ensureLoaded()
|
|||||||
foreach (const QString &packageDir, packageDirs) {
|
foreach (const QString &packageDir, packageDirs) {
|
||||||
QDir dir(packageDir);
|
QDir dir(packageDir);
|
||||||
const QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
const QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
||||||
//qDebug() << static_cast<const void *>(this) << Q_FUNC_INFO << packageDir << files;
|
//qDebug() << static_cast<const void *>(this) << packageDir << files;
|
||||||
if (!fdoXmlFound)
|
if (!fdoXmlFound)
|
||||||
fdoXmlFound = files.contains(QLatin1String("freedesktop.org.xml"));
|
fdoXmlFound = files.contains(QLatin1String("freedesktop.org.xml"));
|
||||||
QStringList::const_iterator endIt(files.constEnd());
|
QStringList::const_iterator endIt(files.constEnd());
|
||||||
|
@ -337,12 +337,10 @@ static void installCoverageTool(QLibraryPrivate *libPrivate)
|
|||||||
|
|
||||||
if (qt_debug_component()) {
|
if (qt_debug_component()) {
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
qDebug("%s: coverage data for %s registered",
|
qDebug("coverage data for %s registered",
|
||||||
Q_FUNC_INFO,
|
|
||||||
qPrintable(libPrivate->fileName));
|
qPrintable(libPrivate->fileName));
|
||||||
} else {
|
} else {
|
||||||
qWarning("%s: could not register %s: error %d; coverage data may be incomplete",
|
qWarning("could not register %s: error %d; coverage data may be incomplete",
|
||||||
Q_FUNC_INFO,
|
|
||||||
qPrintable(libPrivate->fileName),
|
qPrintable(libPrivate->fileName),
|
||||||
ret);
|
ret);
|
||||||
}
|
}
|
||||||
|
@ -907,7 +907,7 @@ void QPixmap::fill(const QPaintDevice *device, const QPoint &p)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(device)
|
Q_UNUSED(device)
|
||||||
Q_UNUSED(p)
|
Q_UNUSED(p)
|
||||||
qWarning("%s is deprecated, ignored", Q_FUNC_INFO);
|
qWarning("this function is deprecated, ignored");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1703,8 +1703,8 @@ QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionF
|
|||||||
|
|
||||||
QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
|
QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
qWarning("%s is deprecated, use QScreen::grabWindow() instead."
|
qWarning("this function is deprecated, use QScreen::grabWindow() instead."
|
||||||
" Defaulting to primary screen.", Q_FUNC_INFO);
|
" Defaulting to primary screen.");
|
||||||
return QGuiApplication::primaryScreen()->grabWindow(window, x, y, w, h);
|
return QGuiApplication::primaryScreen()->grabWindow(window, x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ void QHighDpiScaling::setGlobalFactor(qreal factor)
|
|||||||
if (qFuzzyCompare(factor, m_factor))
|
if (qFuzzyCompare(factor, m_factor))
|
||||||
return;
|
return;
|
||||||
if (!QGuiApplication::allWindows().isEmpty())
|
if (!QGuiApplication::allWindows().isEmpty())
|
||||||
qWarning() << Q_FUNC_INFO << "QHighDpiScaling::setFactor: Should only be called when no windows exist.";
|
qWarning("QHighDpiScaling::setFactor: Should only be called when no windows exist.");
|
||||||
|
|
||||||
m_globalScalingActive = !qFuzzyCompare(factor, qreal(1));
|
m_globalScalingActive = !qFuzzyCompare(factor, qreal(1));
|
||||||
m_factor = m_globalScalingActive ? factor : qreal(1);
|
m_factor = m_globalScalingActive ? factor : qreal(1);
|
||||||
|
@ -69,18 +69,18 @@ bool QPlatformGraphicsBufferHelper::lockAndBindToTexture(QPlatformGraphicsBuffer
|
|||||||
{
|
{
|
||||||
if (graphicsBuffer->lock(QPlatformGraphicsBuffer::TextureAccess)) {
|
if (graphicsBuffer->lock(QPlatformGraphicsBuffer::TextureAccess)) {
|
||||||
if (!graphicsBuffer->bindToTexture(rect)) {
|
if (!graphicsBuffer->bindToTexture(rect)) {
|
||||||
qWarning() << Q_FUNC_INFO << "Failed to bind graphicsbuffer to texture";
|
qWarning("Failed to bind %sgraphicsbuffer to texture", "");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (swizzle)
|
if (swizzle)
|
||||||
*swizzle = false;
|
*swizzle = false;
|
||||||
} else if (graphicsBuffer->lock(QPlatformGraphicsBuffer::SWReadAccess)) {
|
} else if (graphicsBuffer->lock(QPlatformGraphicsBuffer::SWReadAccess)) {
|
||||||
if (!bindSWToTexture(graphicsBuffer, swizzle, rect)) {
|
if (!bindSWToTexture(graphicsBuffer, swizzle, rect)) {
|
||||||
qWarning() << Q_FUNC_INFO << "Failed to bind SW graphcisbuffer to texture";
|
qWarning("Failed to bind %sgraphicsbuffer to texture", "SW ");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qWarning() << Q_FUNC_INFO << "Failed to lock";
|
qWarning("Failed to lock");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -362,7 +362,7 @@ static int log2(uint i)
|
|||||||
int QPlatformScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b)
|
int QPlatformScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b)
|
||||||
{
|
{
|
||||||
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
||||||
qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
|
qWarning("Use QScreen version of %sBetween() when passing Qt::PrimaryOrientation", "angle");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ int QPlatformScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation
|
|||||||
QTransform QPlatformScreen::transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
|
QTransform QPlatformScreen::transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
|
||||||
{
|
{
|
||||||
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
||||||
qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
|
qWarning("Use QScreen version of %sBetween() when passing Qt::PrimaryOrientation", "transform");
|
||||||
return QTransform();
|
return QTransform();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ QTransform QPlatformScreen::transformBetween(Qt::ScreenOrientation a, Qt::Screen
|
|||||||
QRect QPlatformScreen::mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
|
QRect QPlatformScreen::mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
|
||||||
{
|
{
|
||||||
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
|
||||||
qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
|
qWarning("Use QScreen version of %sBetween() when passing Qt::PrimaryOrientation", "map");
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ QPixmap QScreen::grabWindow(WId window, int x, int y, int width, int height)
|
|||||||
{
|
{
|
||||||
const QPlatformScreen *platformScreen = handle();
|
const QPlatformScreen *platformScreen = handle();
|
||||||
if (!platformScreen) {
|
if (!platformScreen) {
|
||||||
qWarning("%s invoked with handle==0", Q_FUNC_INFO);
|
qWarning("invoked with handle==0");
|
||||||
return QPixmap();
|
return QPixmap();
|
||||||
}
|
}
|
||||||
return platformScreen->grabWindow(window, x, y, width, height);
|
return platformScreen->grabWindow(window, x, y, width, height);
|
||||||
|
@ -369,7 +369,7 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate)
|
|||||||
{
|
{
|
||||||
Q_Q(QWindow);
|
Q_Q(QWindow);
|
||||||
if (parentWindow) {
|
if (parentWindow) {
|
||||||
qWarning() << this << Q_FUNC_INFO << '(' << newScreen << "): Attempt to set a screen on a child window.";
|
qWarning() << this << '(' << newScreen << "): Attempt to set a screen on a child window.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newScreen != topLevelScreen) {
|
if (newScreen != topLevelScreen) {
|
||||||
@ -604,7 +604,7 @@ void QWindow::setParent(QWindow *parent)
|
|||||||
|
|
||||||
QScreen *newScreen = parent ? parent->screen() : screen();
|
QScreen *newScreen = parent ? parent->screen() : screen();
|
||||||
if (d->windowRecreationRequired(newScreen)) {
|
if (d->windowRecreationRequired(newScreen)) {
|
||||||
qWarning() << this << Q_FUNC_INFO << '(' << parent << "): Cannot change screens (" << screen() << newScreen << ')';
|
qWarning() << this << '(' << parent << "): Cannot change screens (" << screen() << newScreen << ')';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1160,7 +1160,7 @@ void QWindow::setTransientParent(QWindow *parent)
|
|||||||
{
|
{
|
||||||
Q_D(QWindow);
|
Q_D(QWindow);
|
||||||
if (parent && !parent->isTopLevel()) {
|
if (parent && !parent->isTopLevel()) {
|
||||||
qWarning() << Q_FUNC_INFO << parent << "must be a top level window.";
|
qWarning() << parent << "must be a top level window.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ struct VersionTerm {
|
|||||||
bool VersionTerm::matches(const QVersionNumber &other) const
|
bool VersionTerm::matches(const QVersionNumber &other) const
|
||||||
{
|
{
|
||||||
if (isNull() || other.isNull()) {
|
if (isNull() || other.isNull()) {
|
||||||
qWarning() << Q_FUNC_INFO << "called with invalid parameters";
|
qWarning("called with invalid parameters");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch (op) {
|
switch (op) {
|
||||||
@ -262,7 +262,7 @@ struct OsTypeTerm
|
|||||||
bool matches(const QString &osName, const QVersionNumber &kernelVersion, const QString &osRelease) const
|
bool matches(const QString &osName, const QVersionNumber &kernelVersion, const QString &osRelease) const
|
||||||
{
|
{
|
||||||
if (isNull() || osName.isEmpty() || kernelVersion.isNull()) {
|
if (isNull() || osName.isEmpty() || kernelVersion.isNull()) {
|
||||||
qWarning() << Q_FUNC_INFO << "called with invalid parameters";
|
qWarning("called with invalid parameters");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (type != osName)
|
if (type != osName)
|
||||||
|
@ -285,7 +285,7 @@ bool QOpenGLTextureBlitterPrivate::buildProgram(ProgramIndex idx, const char *vs
|
|||||||
p->glProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, fs);
|
p->glProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, fs);
|
||||||
p->glProgram->link();
|
p->glProgram->link();
|
||||||
if (!p->glProgram->isLinked()) {
|
if (!p->glProgram->isLinked()) {
|
||||||
qWarning() << Q_FUNC_INFO << "Could not link shader program:\n" << p->glProgram->log();
|
qWarning() << "Could not link shader program:\n" << p->glProgram->log();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3885,7 +3885,7 @@ void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData)
|
|||||||
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
|
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
|
||||||
Operator op = getOperator(data, spans, count);
|
Operator op = getOperator(data, spans, count);
|
||||||
if (!op.funcSolid64) {
|
if (!op.funcSolid64) {
|
||||||
qDebug() << Q_FUNC_INFO << "unsupported 64bit blend attempted";
|
qDebug("unsupported 64bit blend attempted");
|
||||||
return blend_color_generic(count, spans, userData);
|
return blend_color_generic(count, spans, userData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4180,7 +4180,7 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi
|
|||||||
|
|
||||||
Operator op = getOperator(data, spans, count);
|
Operator op = getOperator(data, spans, count);
|
||||||
if (!op.func64) {
|
if (!op.func64) {
|
||||||
qWarning() << Q_FUNC_INFO << "Unsupported blend";
|
qWarning("Unsupported blend");
|
||||||
return blend_untransformed_generic(count, spans, userData);
|
return blend_untransformed_generic(count, spans, userData);
|
||||||
}
|
}
|
||||||
QRgba64 buffer[buffer_size];
|
QRgba64 buffer[buffer_size];
|
||||||
|
@ -197,7 +197,7 @@ bool QDesktopServices::openUrl(const QUrl &url)
|
|||||||
|
|
||||||
QPlatformServices *platformServices = platformIntegration->services();
|
QPlatformServices *platformServices = platformIntegration->services();
|
||||||
if (!platformServices) {
|
if (!platformServices) {
|
||||||
qWarning("%s: The platform plugin does not support services.", Q_FUNC_INFO);
|
qWarning("The platform plugin does not support services.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return url.scheme() == QLatin1String("file") ?
|
return url.scheme() == QLatin1String("file") ?
|
||||||
|
@ -452,7 +452,7 @@ bool QSpdyProtocolHandler::uncompressHeader(const QByteArray &input, QByteArray
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
qWarning() << Q_FUNC_INFO << "got unexpected zlib return value:" << zlibRet;
|
qWarning() << "got unexpected zlib return value:" << zlibRet;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -688,7 +688,7 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
|
|||||||
Q_ASSERT(replyPrivate);
|
Q_ASSERT(replyPrivate);
|
||||||
|
|
||||||
if (reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYHalfClosed || reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYClosed) {
|
if (reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYHalfClosed || reply->d_func()->state == QHttpNetworkReplyPrivate::SPDYClosed) {
|
||||||
qWarning() << Q_FUNC_INFO << "Trying to upload to closed stream";
|
qWarning("Trying to upload to closed stream");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ void QSpdyProtocolHandler::handleControlFrame(const QByteArray &frameHeaders) //
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
qWarning() << Q_FUNC_INFO << "cannot handle frame of type" << type;
|
qWarning() << "cannot handle frame of type" << type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -887,13 +887,13 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
|
|||||||
|
|
||||||
QByteArray uncompressedHeader;
|
QByteArray uncompressedHeader;
|
||||||
if (!uncompressHeader(headerValuePairs, &uncompressedHeader)) {
|
if (!uncompressHeader(headerValuePairs, &uncompressedHeader)) {
|
||||||
qWarning() << Q_FUNC_INFO << "error reading header from SYN_REPLY message";
|
qWarning("error reading header from SYN_REPLY message");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32 headerCount = fourBytesToInt(uncompressedHeader.constData());
|
qint32 headerCount = fourBytesToInt(uncompressedHeader.constData());
|
||||||
if (headerCount * 8 > uncompressedHeader.size()) {
|
if (headerCount * 8 > uncompressedHeader.size()) {
|
||||||
qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
|
qWarning("error parsing header from SYN_REPLY message");
|
||||||
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -904,7 +904,7 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
|
|||||||
QByteArray name = uncompressedHeader.mid(readPointer, count);
|
QByteArray name = uncompressedHeader.mid(readPointer, count);
|
||||||
readPointer += count;
|
readPointer += count;
|
||||||
if (readPointer > uncompressedHeader.size()) {
|
if (readPointer > uncompressedHeader.size()) {
|
||||||
qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
|
qWarning("error parsing header from SYN_REPLY message");
|
||||||
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -913,7 +913,7 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
|
|||||||
QByteArray value = uncompressedHeader.mid(readPointer, count);
|
QByteArray value = uncompressedHeader.mid(readPointer, count);
|
||||||
readPointer += count;
|
readPointer += count;
|
||||||
if (readPointer > uncompressedHeader.size()) {
|
if (readPointer > uncompressedHeader.size()) {
|
||||||
qWarning() << Q_FUNC_INFO << "error parsing header from SYN_REPLY message";
|
qWarning("error parsing header from SYN_REPLY message");
|
||||||
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
sendRST_STREAM(streamID, RST_STREAM_PROTOCOL_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1014,7 +1014,7 @@ void QSpdyProtocolHandler::handleRST_STREAM(char /*flags*/, quint32 length,
|
|||||||
errorMessage = "server cannot process the frame because it is too large";
|
errorMessage = "server cannot process the frame because it is too large";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qWarning() << Q_FUNC_INFO << "could not understand servers RST_STREAM status code";
|
qWarning("could not understand servers RST_STREAM status code");
|
||||||
errorCode = QNetworkReply::ProtocolFailure;
|
errorCode = QNetworkReply::ProtocolFailure;
|
||||||
errorMessage = "got SPDY RST_STREAM message with unknown error code";
|
errorMessage = "got SPDY RST_STREAM message with unknown error code";
|
||||||
}
|
}
|
||||||
@ -1078,7 +1078,7 @@ void QSpdyProtocolHandler::handleSETTINGS(char flags, quint32 /*length*/, const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
qWarning() << Q_FUNC_INFO << "found unknown settings value" << value;
|
qWarning() << "found unknown settings value" << value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1117,7 +1117,7 @@ void QSpdyProtocolHandler::handleGOAWAY(char /*flags*/, quint32 /*length*/,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
qWarning() << Q_FUNC_INFO << "unexpected status code" << statusCode;
|
qWarning() << "unexpected status code" << statusCode;
|
||||||
errorCode = QNetworkReply::ProtocolUnknownError;
|
errorCode = QNetworkReply::ProtocolUnknownError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1252,7 +1252,7 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flag_compress) {
|
if (flag_compress) {
|
||||||
qWarning() << Q_FUNC_INFO << "SPDY level compression is not supported";
|
qWarning("SPDY level compression is not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag_fin) {
|
if (flag_fin) {
|
||||||
|
@ -211,30 +211,30 @@ static QNetworkConfiguration::BearerType cellularStatus()
|
|||||||
|
|
||||||
int cellularStatusFD;
|
int cellularStatusFD;
|
||||||
if ((cellularStatusFD = qt_safe_open(cellularStatusFile, O_RDONLY)) == -1) {
|
if ((cellularStatusFD = qt_safe_open(cellularStatusFile, O_RDONLY)) == -1) {
|
||||||
qWarning() << Q_FUNC_INFO << "failed to open" << cellularStatusFile;
|
qWarning() << "failed to open" << cellularStatusFile;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
char buf[2048];
|
char buf[2048];
|
||||||
if (qt_safe_read(cellularStatusFD, &buf, sizeof(buf)) == -1) {
|
if (qt_safe_read(cellularStatusFD, &buf, sizeof(buf)) == -1) {
|
||||||
qWarning() << Q_FUNC_INFO << "read from PPS file failed:" << strerror(errno);
|
qWarning() << "read from PPS file failed:" << strerror(errno);
|
||||||
qt_safe_close(cellularStatusFD);
|
qt_safe_close(cellularStatusFD);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
pps_decoder_t ppsDecoder;
|
pps_decoder_t ppsDecoder;
|
||||||
if (pps_decoder_initialize(&ppsDecoder, buf) != PPS_DECODER_OK) {
|
if (pps_decoder_initialize(&ppsDecoder, buf) != PPS_DECODER_OK) {
|
||||||
qWarning() << Q_FUNC_INFO << "failed to initialize PPS decoder";
|
qWarning("failed to initialize PPS decoder");
|
||||||
qt_safe_close(cellularStatusFD);
|
qt_safe_close(cellularStatusFD);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
pps_decoder_error_t err;
|
pps_decoder_error_t err;
|
||||||
if ((err = pps_decoder_push(&ppsDecoder, 0)) != PPS_DECODER_OK) {
|
if ((err = pps_decoder_push(&ppsDecoder, 0)) != PPS_DECODER_OK) {
|
||||||
qWarning() << Q_FUNC_INFO << "pps_decoder_push failed" << err;
|
qWarning() << "pps_decoder_push failed" << err;
|
||||||
pps_decoder_cleanup(&ppsDecoder);
|
pps_decoder_cleanup(&ppsDecoder);
|
||||||
qt_safe_close(cellularStatusFD);
|
qt_safe_close(cellularStatusFD);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (!pps_decoder_is_integer(&ppsDecoder, "network_technology")) {
|
if (!pps_decoder_is_integer(&ppsDecoder, "network_technology")) {
|
||||||
qWarning() << Q_FUNC_INFO << "field has not the expected data type";
|
qWarning("field has not the expected data type");
|
||||||
pps_decoder_cleanup(&ppsDecoder);
|
pps_decoder_cleanup(&ppsDecoder);
|
||||||
qt_safe_close(cellularStatusFD);
|
qt_safe_close(cellularStatusFD);
|
||||||
return ret;
|
return ret;
|
||||||
@ -242,7 +242,7 @@ static QNetworkConfiguration::BearerType cellularStatus()
|
|||||||
int type;
|
int type;
|
||||||
if (!pps_decoder_get_int(&ppsDecoder, "network_technology", &type)
|
if (!pps_decoder_get_int(&ppsDecoder, "network_technology", &type)
|
||||||
== PPS_DECODER_OK) {
|
== PPS_DECODER_OK) {
|
||||||
qWarning() << Q_FUNC_INFO << "could not read bearer type from PPS";
|
qWarning("could not read bearer type from PPS");
|
||||||
pps_decoder_cleanup(&ppsDecoder);
|
pps_decoder_cleanup(&ppsDecoder);
|
||||||
qt_safe_close(cellularStatusFD);
|
qt_safe_close(cellularStatusFD);
|
||||||
return ret;
|
return ret;
|
||||||
@ -264,7 +264,7 @@ static QNetworkConfiguration::BearerType cellularStatus()
|
|||||||
ret = QNetworkConfiguration::BearerLTE;
|
ret = QNetworkConfiguration::BearerLTE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qWarning() << Q_FUNC_INFO << "unhandled bearer type" << type;
|
qWarning() << "unhandled bearer type" << type;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pps_decoder_cleanup(&ppsDecoder);
|
pps_decoder_cleanup(&ppsDecoder);
|
||||||
|
@ -41,7 +41,7 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
|||||||
Q_UNUSED(requestName);
|
Q_UNUSED(requestName);
|
||||||
Q_UNUSED(nameserver);
|
Q_UNUSED(nameserver);
|
||||||
Q_UNUSED(reply);
|
Q_UNUSED(reply);
|
||||||
qWarning() << Q_FUNC_INFO << "Not yet supported on Android";
|
qWarning("Not yet supported on Android");
|
||||||
reply->error = QDnsLookup::ResolverError;
|
reply->error = QDnsLookup::ResolverError;
|
||||||
reply->errorString = tr("Not yet supported on Android");
|
reply->errorString = tr("Not yet supported on Android");
|
||||||
return;
|
return;
|
||||||
|
@ -166,7 +166,7 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
|||||||
ns->sin6_addr.s6_addr[i] = ipv6Address[i];
|
ns->sin6_addr.s6_addr[i] = ipv6Address[i];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
qWarning() << Q_FUNC_INFO << "IPv6 addresses for nameservers is currently not supported";
|
qWarning("IPv6 addresses for nameservers is currently not supported");
|
||||||
reply->error = QDnsLookup::ResolverError;
|
reply->error = QDnsLookup::ResolverError;
|
||||||
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
||||||
return;
|
return;
|
||||||
|
@ -60,7 +60,7 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
|||||||
// For supoprting IPv6 nameserver addresses, we'll need to switch
|
// For supoprting IPv6 nameserver addresses, we'll need to switch
|
||||||
// from DnsQuey() to DnsQueryEx() as it supports passing an IPv6
|
// from DnsQuey() to DnsQueryEx() as it supports passing an IPv6
|
||||||
// address in the nameserver list
|
// address in the nameserver list
|
||||||
qWarning() << Q_FUNC_INFO << "IPv6 addresses for nameservers is currently not supported";
|
qWarning("IPv6 addresses for nameservers is currently not supported");
|
||||||
reply->error = QDnsLookup::ResolverError;
|
reply->error = QDnsLookup::ResolverError;
|
||||||
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
reply->errorString = tr("IPv6 addresses for nameservers is currently not supported");
|
||||||
return;
|
return;
|
||||||
|
@ -246,8 +246,7 @@ bool QGLShaderPrivate::create()
|
|||||||
else
|
else
|
||||||
shader = glfuncs->glCreateShader(GL_FRAGMENT_SHADER);
|
shader = glfuncs->glCreateShader(GL_FRAGMENT_SHADER);
|
||||||
if (!shader) {
|
if (!shader) {
|
||||||
qWarning("%s: Could not create shader of type %d.",
|
qWarning("Could not create shader of type %d.", int(shaderType));
|
||||||
Q_FUNC_INFO, int(shaderType));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
shaderGuard = createSharedResourceGuard(context, shader, freeShaderFunc);
|
shaderGuard = createSharedResourceGuard(context, shader, freeShaderFunc);
|
||||||
|
@ -134,7 +134,7 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
|
|||||||
return openDocument(url);
|
return openDocument(url);
|
||||||
|
|
||||||
if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) {
|
if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) {
|
||||||
qWarning("%s: Unable to detect a web browser to launch '%s'", Q_FUNC_INFO, qPrintable(url.toString()));
|
qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return launch(m_webBrowser, url);
|
return launch(m_webBrowser, url);
|
||||||
@ -143,7 +143,7 @@ bool QGenericUnixServices::openUrl(const QUrl &url)
|
|||||||
bool QGenericUnixServices::openDocument(const QUrl &url)
|
bool QGenericUnixServices::openDocument(const QUrl &url)
|
||||||
{
|
{
|
||||||
if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) {
|
if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) {
|
||||||
qWarning("%s: Unable to detect a launcher for '%s'", Q_FUNC_INFO, qPrintable(url.toString()));
|
qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return launch(m_documentLauncher, url);
|
return launch(m_documentLauncher, url);
|
||||||
|
@ -546,7 +546,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme()
|
|||||||
|
|
||||||
kdeDirs.removeDuplicates();
|
kdeDirs.removeDuplicates();
|
||||||
if (kdeDirs.isEmpty()) {
|
if (kdeDirs.isEmpty()) {
|
||||||
qWarning("%s: Unable to determine KDE dirs", Q_FUNC_INFO);
|
qWarning("Unable to determine KDE dirs");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,14 +151,14 @@ void QBBEngine::disconnectFromId(const QString &id)
|
|||||||
void QBBEngine::initialize()
|
void QBBEngine::initialize()
|
||||||
{
|
{
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
qWarning() << Q_FUNC_INFO << "called, but instance already initialized.";
|
qWarning("called, but instance already initialized.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceStorage()->setLocalData(new EngineInstanceHolder(this));
|
instanceStorage()->setLocalData(new EngineInstanceHolder(this));
|
||||||
|
|
||||||
if (netstatus_request_events(0) != BPS_SUCCESS) {
|
if (netstatus_request_events(0) != BPS_SUCCESS) {
|
||||||
qWarning() << Q_FUNC_INFO << "cannot register for network events. Polling enabled.";
|
qWarning("cannot register for network events. Polling enabled.");
|
||||||
|
|
||||||
const QMutexLocker locker(&pollingMutex);
|
const QMutexLocker locker(&pollingMutex);
|
||||||
pollingRequired = true;
|
pollingRequired = true;
|
||||||
@ -176,12 +176,12 @@ void QBBEngine::requestUpdate()
|
|||||||
|
|
||||||
void QBBEngine::doRequestUpdate()
|
void QBBEngine::doRequestUpdate()
|
||||||
{
|
{
|
||||||
qBearerDebug() << Q_FUNC_INFO << "entered method";
|
qBearerDebug("entered method");
|
||||||
|
|
||||||
netstatus_interface_list_t interfaceList;
|
netstatus_interface_list_t interfaceList;
|
||||||
|
|
||||||
if ((netstatus_get_interfaces(&interfaceList)) != BPS_SUCCESS) {
|
if ((netstatus_get_interfaces(&interfaceList)) != BPS_SUCCESS) {
|
||||||
qBearerDebug() << Q_FUNC_INFO << "cannot retrieve interface list";
|
qBearerDebug("cannot retrieve interface list");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void QBBEngine::doRequestUpdate()
|
|||||||
for (int i = 0; i < interfaceList.num_interfaces; i++) {
|
for (int i = 0; i < interfaceList.num_interfaces; i++) {
|
||||||
const char *interface = interfaceList.interfaces[i];
|
const char *interface = interfaceList.interfaces[i];
|
||||||
|
|
||||||
qBearerDebug() << Q_FUNC_INFO << "discovered interface" << interface;
|
qBearerDebug() << "discovered interface" << interface;
|
||||||
|
|
||||||
updateConfiguration(interface);
|
updateConfiguration(interface);
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ QNetworkConfigurationPrivatePointer QBBEngine::defaultConfiguration()
|
|||||||
const QMutexLocker locker(&mutex);
|
const QMutexLocker locker(&mutex);
|
||||||
|
|
||||||
if (accessPointConfigurations.contains(id)) {
|
if (accessPointConfigurations.contains(id)) {
|
||||||
qBearerDebug() << Q_FUNC_INFO << "found default interface:" << id;
|
qBearerDebug() << "found default interface:" << id;
|
||||||
|
|
||||||
return accessPointConfigurations.value(id);
|
return accessPointConfigurations.value(id);
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ bool QBBEngine::nativeEventFilter(const QByteArray &eventType, void *message, lo
|
|||||||
Q_ASSERT(event);
|
Q_ASSERT(event);
|
||||||
|
|
||||||
if (bps_event_get_domain(event) == netstatus_get_domain()) {
|
if (bps_event_get_domain(event) == netstatus_get_domain()) {
|
||||||
qBearerDebug() << Q_FUNC_INFO << "got update request.";
|
qBearerDebug("got update request.");
|
||||||
doRequestUpdate();
|
doRequestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ void QBBEngine::updateConfiguration(const char *interface)
|
|||||||
netstatus_interface_details_t *details = 0;
|
netstatus_interface_details_t *details = 0;
|
||||||
|
|
||||||
if (netstatus_get_interface_details(interface, &details) != BPS_SUCCESS) {
|
if (netstatus_get_interface_details(interface, &details) != BPS_SUCCESS) {
|
||||||
qBearerDebug() << Q_FUNC_INFO << "cannot retrieve details for interface" << interface;
|
qBearerDebug() << "cannot retrieve details for interface" << interface;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -355,12 +355,12 @@ void QBBEngine::updateConfiguration(const char *interface)
|
|||||||
locker.unlock();
|
locker.unlock();
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
qBearerDebug() << Q_FUNC_INFO << "configuration changed:" << interface;
|
qBearerDebug() << "configuration changed:" << interface;
|
||||||
|
|
||||||
Q_EMIT configurationChanged(ptr);
|
Q_EMIT configurationChanged(ptr);
|
||||||
} else {
|
} else {
|
||||||
// maybe Wifi has changed but gateway not yet ready etc.
|
// maybe Wifi has changed but gateway not yet ready etc.
|
||||||
qBearerDebug() << Q_FUNC_INFO << "configuration has not changed.";
|
qBearerDebug("configuration has not changed.");
|
||||||
if (oldIpStatus != ipStatus) { // if IP status changed
|
if (oldIpStatus != ipStatus) { // if IP status changed
|
||||||
if (ipStatus != NETSTATUS_IP_STATUS_OK
|
if (ipStatus != NETSTATUS_IP_STATUS_OK
|
||||||
&& ipStatus != NETSTATUS_IP_STATUS_ERROR_NOT_UP
|
&& ipStatus != NETSTATUS_IP_STATUS_ERROR_NOT_UP
|
||||||
@ -389,7 +389,7 @@ void QBBEngine::updateConfiguration(const char *interface)
|
|||||||
|
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
|
|
||||||
qBearerDebug() << Q_FUNC_INFO << "configuration added:" << interface;
|
qBearerDebug() << "configuration added:" << interface;
|
||||||
|
|
||||||
Q_EMIT configurationAdded(ptr);
|
Q_EMIT configurationAdded(ptr);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
|
|||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
} else {
|
} else {
|
||||||
qWarning() << Q_FUNC_INFO << "propsReply"<<propsReply.error().message();
|
qWarning() << "propsReply" << propsReply.error().message();
|
||||||
}
|
}
|
||||||
|
|
||||||
QDBusPendingReply<QList <QDBusObjectPath> > nmReply
|
QDBusPendingReply<QList <QDBusObjectPath> > nmReply
|
||||||
@ -83,7 +83,7 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
|
|||||||
if (!nmReply.isError()) {
|
if (!nmReply.isError()) {
|
||||||
devicesPathList = nmReply.value();
|
devicesPathList = nmReply.value();
|
||||||
} else {
|
} else {
|
||||||
qWarning() << Q_FUNC_INFO <<"nmReply"<<nmReply.error().message();
|
qWarning() << "nmReply" << nmReply.error().message();
|
||||||
}
|
}
|
||||||
|
|
||||||
QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE),
|
QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE),
|
||||||
@ -789,7 +789,7 @@ bool QNetworkManagerSettings::setConnections()
|
|||||||
QLatin1String("NewConnection"),
|
QLatin1String("NewConnection"),
|
||||||
this, SIGNAL(newConnection(QDBusObjectPath)))) {
|
this, SIGNAL(newConnection(QDBusObjectPath)))) {
|
||||||
allOk = false;
|
allOk = false;
|
||||||
qWarning() << Q_FUNC_INFO << "NewConnection could not be connected";
|
qWarning("NewConnection could not be connected");
|
||||||
}
|
}
|
||||||
|
|
||||||
return allOk;
|
return allOk;
|
||||||
|
@ -294,7 +294,7 @@ void QCocoaMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *
|
|||||||
int index = m_menuItems.indexOf(beforeItem);
|
int index = m_menuItems.indexOf(beforeItem);
|
||||||
// if a before item is supplied, it should be in the menu
|
// if a before item is supplied, it should be in the menu
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
qWarning() << Q_FUNC_INFO << "Before menu item not found";
|
qWarning("Before menu item not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_menuItems.insert(index, cocoaItem);
|
m_menuItems.insert(index, cocoaItem);
|
||||||
@ -315,7 +315,7 @@ void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ([item->nsItem() menu]) {
|
if ([item->nsItem() menu]) {
|
||||||
qWarning() << Q_FUNC_INFO << "Menu item is already in a menu, remove it from the other menu first before inserting";
|
qWarning("Menu item is already in a menu, remove it from the other menu first before inserting");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if the item we're inserting before is merged, skip along until
|
// if the item we're inserting before is merged, skip along until
|
||||||
@ -326,7 +326,7 @@ void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem)
|
|||||||
|
|
||||||
if (beforeItem) {
|
if (beforeItem) {
|
||||||
if (beforeItem->isMerged()) {
|
if (beforeItem->isMerged()) {
|
||||||
qWarning() << Q_FUNC_INFO << "No non-merged before menu item found";
|
qWarning("No non-merged before menu item found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSUInteger nativeIndex = [m_nativeMenu indexOfItem:beforeItem->nsItem()];
|
NSUInteger nativeIndex = [m_nativeMenu indexOfItem:beforeItem->nsItem()];
|
||||||
@ -342,7 +342,7 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem)
|
|||||||
QMacAutoReleasePool pool;
|
QMacAutoReleasePool pool;
|
||||||
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
||||||
if (!m_menuItems.contains(cocoaItem)) {
|
if (!m_menuItems.contains(cocoaItem)) {
|
||||||
qWarning() << Q_FUNC_INFO << "Menu does not contain the item to be removed";
|
qWarning("Menu does not contain the item to be removed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem)
|
|||||||
m_menuItems.removeOne(cocoaItem);
|
m_menuItems.removeOne(cocoaItem);
|
||||||
if (!cocoaItem->isMerged()) {
|
if (!cocoaItem->isMerged()) {
|
||||||
if (m_nativeMenu != [cocoaItem->nsItem() menu]) {
|
if (m_nativeMenu != [cocoaItem->nsItem() menu]) {
|
||||||
qWarning() << Q_FUNC_INFO << "Item to remove does not belong to this menu";
|
qWarning("Item to remove does not belong to this menu");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
[m_nativeMenu removeItem: cocoaItem->nsItem()];
|
[m_nativeMenu removeItem: cocoaItem->nsItem()];
|
||||||
@ -372,7 +372,7 @@ void QCocoaMenu::syncMenuItem(QPlatformMenuItem *menuItem)
|
|||||||
QMacAutoReleasePool pool;
|
QMacAutoReleasePool pool;
|
||||||
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
QCocoaMenuItem *cocoaItem = static_cast<QCocoaMenuItem *>(menuItem);
|
||||||
if (!m_menuItems.contains(cocoaItem)) {
|
if (!m_menuItems.contains(cocoaItem)) {
|
||||||
qWarning() << Q_FUNC_INFO << "Item does not belong to this menu";
|
qWarning("Item does not belong to this menu");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,12 +108,12 @@ void QCocoaMenuBar::insertMenu(QPlatformMenu *platformMenu, QPlatformMenu *befor
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_menus.contains(menu)) {
|
if (m_menus.contains(menu)) {
|
||||||
qWarning() << Q_FUNC_INFO << "This menu already belongs to the menubar, remove it first";
|
qWarning("This menu already belongs to the menubar, remove it first");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (beforeMenu && !m_menus.contains(beforeMenu)) {
|
if (beforeMenu && !m_menus.contains(beforeMenu)) {
|
||||||
qWarning() << Q_FUNC_INFO << "The before menu does not belong to the menubar";
|
qWarning("The before menu does not belong to the menubar");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ void QCocoaMenuBar::removeMenu(QPlatformMenu *platformMenu)
|
|||||||
{
|
{
|
||||||
QCocoaMenu *menu = static_cast<QCocoaMenu *>(platformMenu);
|
QCocoaMenu *menu = static_cast<QCocoaMenu *>(platformMenu);
|
||||||
if (!m_menus.contains(menu)) {
|
if (!m_menus.contains(menu)) {
|
||||||
qWarning() << Q_FUNC_INFO << "Trying to remove a menu that does not belong to the menubar";
|
qWarning("Trying to remove a menu that does not belong to the menubar");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_menus.removeOne(menu);
|
m_menus.removeOne(menu);
|
||||||
|
@ -281,7 +281,7 @@ NSMenuItem *QCocoaMenuItem::sync()
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
qWarning() << Q_FUNC_INFO << "menu item" << m_text << "has unsupported role" << (int)m_role;
|
qWarning() << "menu item" << m_text << "has unsupported role" << (int)m_role;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mergeItem) {
|
if (mergeItem) {
|
||||||
@ -398,7 +398,7 @@ QKeySequence QCocoaMenuItem::mergeAccel()
|
|||||||
void QCocoaMenuItem::syncMerged()
|
void QCocoaMenuItem::syncMerged()
|
||||||
{
|
{
|
||||||
if (!m_merged) {
|
if (!m_merged) {
|
||||||
qWarning() << Q_FUNC_INFO << "Trying to sync a non-merged item";
|
qWarning("Trying to sync a non-merged item");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
[m_native setTag:reinterpret_cast<NSInteger>(this)];
|
[m_native setTag:reinterpret_cast<NSInteger>(this)];
|
||||||
|
@ -1523,7 +1523,7 @@ void QCocoaWindow::syncWindowState(Qt::WindowState newState)
|
|||||||
// do nothing except set the new state
|
// do nothing except set the new state
|
||||||
NSRect contentRect = [contentView() frame];
|
NSRect contentRect = [contentView() frame];
|
||||||
if (contentRect.size.width <= 0 || contentRect.size.height <= 0) {
|
if (contentRect.size.width <= 0 || contentRect.size.height <= 0) {
|
||||||
qWarning() << Q_FUNC_INFO << "invalid window content view size, check your window geometry";
|
qWarning("invalid window content view size, check your window geometry");
|
||||||
m_synchedWindowState = newState;
|
m_synchedWindowState = newState;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ bool QQnxAbstractNavigator::invokeUrl(const QUrl &url)
|
|||||||
// which is not recognized by the navigator anymore
|
// which is not recognized by the navigator anymore
|
||||||
const bool result = requestInvokeUrl(url.toString().toUtf8());
|
const bool result = requestInvokeUrl(url.toString().toUtf8());
|
||||||
|
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "url=" << url << "result=" << result;
|
qNavigatorDebug() << "url=" << url << "result=" << result;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ QQnxBpsEventFilter::~QQnxBpsEventFilter()
|
|||||||
|
|
||||||
void QQnxBpsEventFilter::installOnEventDispatcher(QAbstractEventDispatcher *dispatcher)
|
void QQnxBpsEventFilter::installOnEventDispatcher(QAbstractEventDispatcher *dispatcher)
|
||||||
{
|
{
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "dispatcher=" << dispatcher;
|
qBpsEventFilterDebug() << "dispatcher=" << dispatcher;
|
||||||
|
|
||||||
if (navigator_request_events(NAVIGATOR_EXTENDED_DATA) != BPS_SUCCESS)
|
if (navigator_request_events(NAVIGATOR_EXTENDED_DATA) != BPS_SUCCESS)
|
||||||
qWarning("QQNX: failed to register for navigator events");
|
qWarning("QQNX: failed to register for navigator events");
|
||||||
@ -125,7 +125,7 @@ bool QQnxBpsEventFilter::nativeEventFilter(const QByteArray &eventType, void *me
|
|||||||
Q_UNUSED(result);
|
Q_UNUSED(result);
|
||||||
bps_event_t *event = static_cast<bps_event_t *>(message);
|
bps_event_t *event = static_cast<bps_event_t *>(message);
|
||||||
const int eventDomain = bps_event_get_domain(event);
|
const int eventDomain = bps_event_get_domain(event);
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "event=" << event << "domain=" << eventDomain;
|
qBpsEventFilterDebug() << "event=" << event << "domain=" << eventDomain;
|
||||||
|
|
||||||
if (eventDomain == screen_get_domain()) {
|
if (eventDomain == screen_get_domain()) {
|
||||||
if (!m_screenEventHandler) {
|
if (!m_screenEventHandler) {
|
||||||
@ -151,10 +151,10 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event)
|
|||||||
switch (bps_event_get_code(event)) {
|
switch (bps_event_get_code(event)) {
|
||||||
case NAVIGATOR_ORIENTATION_CHECK: {
|
case NAVIGATOR_ORIENTATION_CHECK: {
|
||||||
const int angle = navigator_event_get_orientation_angle(event);
|
const int angle = navigator_event_get_orientation_angle(event);
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "ORIENTATION CHECK event. angle=" << angle;
|
qBpsEventFilterDebug() << "ORIENTATION CHECK event. angle=" << angle;
|
||||||
|
|
||||||
const bool result = m_navigatorEventHandler->handleOrientationCheck(angle);
|
const bool result = m_navigatorEventHandler->handleOrientationCheck(angle);
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "ORIENTATION CHECK event. result=" << result;
|
qBpsEventFilterDebug() << "ORIENTATION CHECK event. result=" << result;
|
||||||
|
|
||||||
// reply to navigator whether orientation is acceptable
|
// reply to navigator whether orientation is acceptable
|
||||||
navigator_orientation_check_response(event, result);
|
navigator_orientation_check_response(event, result);
|
||||||
@ -163,7 +163,7 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event)
|
|||||||
|
|
||||||
case NAVIGATOR_ORIENTATION: {
|
case NAVIGATOR_ORIENTATION: {
|
||||||
const int angle = navigator_event_get_orientation_angle(event);
|
const int angle = navigator_event_get_orientation_angle(event);
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "ORIENTATION event. angle=" << angle;
|
qBpsEventFilterDebug() << "ORIENTATION event. angle=" << angle;
|
||||||
m_navigatorEventHandler->handleOrientationChange(angle);
|
m_navigatorEventHandler->handleOrientationChange(angle);
|
||||||
|
|
||||||
navigator_done_orientation(event);
|
navigator_done_orientation(event);
|
||||||
@ -171,17 +171,17 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case NAVIGATOR_SWIPE_DOWN:
|
case NAVIGATOR_SWIPE_DOWN:
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "SWIPE DOWN event";
|
qBpsEventFilterDebug("SWIPE DOWN event");
|
||||||
m_navigatorEventHandler->handleSwipeDown();
|
m_navigatorEventHandler->handleSwipeDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_EXIT:
|
case NAVIGATOR_EXIT:
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "EXIT event";
|
qBpsEventFilterDebug("EXIT event");
|
||||||
m_navigatorEventHandler->handleExit();
|
m_navigatorEventHandler->handleExit();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAVIGATOR_WINDOW_STATE: {
|
case NAVIGATOR_WINDOW_STATE: {
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "WINDOW STATE event";
|
qBpsEventFilterDebug("WINDOW STATE event");
|
||||||
const navigator_window_state_t state = navigator_event_get_window_state(event);
|
const navigator_window_state_t state = navigator_event_get_window_state(event);
|
||||||
const QByteArray id(navigator_event_get_groupid(event));
|
const QByteArray id(navigator_event_get_groupid(event));
|
||||||
|
|
||||||
@ -200,14 +200,14 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case NAVIGATOR_WINDOW_ACTIVE: {
|
case NAVIGATOR_WINDOW_ACTIVE: {
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "WINDOW ACTIVE event";
|
qBpsEventFilterDebug("WINDOW ACTIVE event");
|
||||||
const QByteArray id(navigator_event_get_groupid(event));
|
const QByteArray id(navigator_event_get_groupid(event));
|
||||||
m_navigatorEventHandler->handleWindowGroupActivated(id);
|
m_navigatorEventHandler->handleWindowGroupActivated(id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NAVIGATOR_WINDOW_INACTIVE: {
|
case NAVIGATOR_WINDOW_INACTIVE: {
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "WINDOW INACTIVE event";
|
qBpsEventFilterDebug("WINDOW INACTIVE event");
|
||||||
const QByteArray id(navigator_event_get_groupid(event));
|
const QByteArray id(navigator_event_get_groupid(event));
|
||||||
m_navigatorEventHandler->handleWindowGroupDeactivated(id);
|
m_navigatorEventHandler->handleWindowGroupDeactivated(id);
|
||||||
break;
|
break;
|
||||||
@ -219,7 +219,7 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
qBpsEventFilterDebug() << Q_FUNC_INFO << "Unhandled navigator event. code=" << bps_event_get_code(event);
|
qBpsEventFilterDebug() << "Unhandled navigator event. code=" << bps_event_get_code(event);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,13 +51,13 @@ QT_BEGIN_NAMESPACE
|
|||||||
QQnxBuffer::QQnxBuffer()
|
QQnxBuffer::QQnxBuffer()
|
||||||
: m_buffer(0)
|
: m_buffer(0)
|
||||||
{
|
{
|
||||||
qBufferDebug() << Q_FUNC_INFO << "empty";
|
qBufferDebug("empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
QQnxBuffer::QQnxBuffer(screen_buffer_t buffer)
|
QQnxBuffer::QQnxBuffer(screen_buffer_t buffer)
|
||||||
: m_buffer(buffer)
|
: m_buffer(buffer)
|
||||||
{
|
{
|
||||||
qBufferDebug() << Q_FUNC_INFO << "normal";
|
qBufferDebug("normal");
|
||||||
|
|
||||||
// Get size of buffer
|
// Get size of buffer
|
||||||
int size[2];
|
int size[2];
|
||||||
@ -118,17 +118,17 @@ QQnxBuffer::QQnxBuffer(const QQnxBuffer &other)
|
|||||||
: m_buffer(other.m_buffer),
|
: m_buffer(other.m_buffer),
|
||||||
m_image(other.m_image)
|
m_image(other.m_image)
|
||||||
{
|
{
|
||||||
qBufferDebug() << Q_FUNC_INFO << "copy";
|
qBufferDebug("copy");
|
||||||
}
|
}
|
||||||
|
|
||||||
QQnxBuffer::~QQnxBuffer()
|
QQnxBuffer::~QQnxBuffer()
|
||||||
{
|
{
|
||||||
qBufferDebug() << Q_FUNC_INFO;
|
qBufferDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxBuffer::invalidateInCache()
|
void QQnxBuffer::invalidateInCache()
|
||||||
{
|
{
|
||||||
qBufferDebug() << Q_FUNC_INFO;
|
qBufferDebug();
|
||||||
|
|
||||||
// Verify native buffer exists
|
// Verify native buffer exists
|
||||||
if (m_buffer == 0)
|
if (m_buffer == 0)
|
||||||
|
@ -74,7 +74,7 @@ QQnxButtonEventNotifier::~QQnxButtonEventNotifier()
|
|||||||
|
|
||||||
void QQnxButtonEventNotifier::start()
|
void QQnxButtonEventNotifier::start()
|
||||||
{
|
{
|
||||||
qButtonDebug() << Q_FUNC_INFO << "starting hardware button event processing";
|
qButtonDebug("starting hardware button event processing");
|
||||||
if (m_fd != -1)
|
if (m_fd != -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ void QQnxButtonEventNotifier::start()
|
|||||||
m_readNotifier = new QSocketNotifier(m_fd, QSocketNotifier::Read);
|
m_readNotifier = new QSocketNotifier(m_fd, QSocketNotifier::Read);
|
||||||
QObject::connect(m_readNotifier, SIGNAL(activated(int)), this, SLOT(updateButtonStates()));
|
QObject::connect(m_readNotifier, SIGNAL(activated(int)), this, SLOT(updateButtonStates()));
|
||||||
|
|
||||||
qButtonDebug() << Q_FUNC_INFO << "successfully connected to Navigator. fd =" << m_fd;
|
qButtonDebug() << "successfully connected to Navigator. fd =" << m_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxButtonEventNotifier::updateButtonStates()
|
void QQnxButtonEventNotifier::updateButtonStates()
|
||||||
@ -115,7 +115,7 @@ void QQnxButtonEventNotifier::updateButtonStates()
|
|||||||
// Ensure data is null terminated
|
// Ensure data is null terminated
|
||||||
buffer[bytes] = '\0';
|
buffer[bytes] = '\0';
|
||||||
|
|
||||||
qButtonDebug() << Q_FUNC_INFO << "received PPS message:\n" << buffer;
|
qButtonDebug() << "received PPS message:\n" << buffer;
|
||||||
|
|
||||||
// Process received message
|
// Process received message
|
||||||
QByteArray ppsData = QByteArray::fromRawData(buffer, bytes);
|
QByteArray ppsData = QByteArray::fromRawData(buffer, bytes);
|
||||||
@ -197,7 +197,7 @@ bool QQnxButtonEventNotifier::parsePPS(const QByteArray &ppsData, QHash<QByteArr
|
|||||||
// tokenize current attribute
|
// tokenize current attribute
|
||||||
const QByteArray &attr = lines.at(i);
|
const QByteArray &attr = lines.at(i);
|
||||||
|
|
||||||
qButtonDebug() << Q_FUNC_INFO << "attr=" << attr;
|
qButtonDebug() << "attr=" << attr;
|
||||||
|
|
||||||
int doubleColon = attr.indexOf(QByteArrayLiteral("::"));
|
int doubleColon = attr.indexOf(QByteArrayLiteral("::"));
|
||||||
if (doubleColon == -1) {
|
if (doubleColon == -1) {
|
||||||
|
@ -94,13 +94,13 @@ public:
|
|||||||
|
|
||||||
void addFormatToCheck(const QString &format) {
|
void addFormatToCheck(const QString &format) {
|
||||||
m_formatsToCheck << format;
|
m_formatsToCheck << format;
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "formats=" << m_formatsToCheck;
|
qClipboardDebug() << "formats=" << m_formatsToCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasFormat(const QString &mimetype) const
|
bool hasFormat(const QString &mimetype) const
|
||||||
{
|
{
|
||||||
const bool result = is_clipboard_format_present(mimetype.toUtf8().constData()) == 0;
|
const bool result = is_clipboard_format_present(mimetype.toUtf8().constData()) == 0;
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "mimetype=" << mimetype << "result=" << result;
|
qClipboardDebug() << "mimetype=" << mimetype << "result=" << result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ public:
|
|||||||
result << format;
|
result << format;
|
||||||
}
|
}
|
||||||
|
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "result=" << result;
|
qClipboardDebug() << "result=" << result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
QVariant retrieveData(const QString &mimetype, QVariant::Type preferredType) const
|
QVariant retrieveData(const QString &mimetype, QVariant::Type preferredType) const
|
||||||
{
|
{
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "mimetype=" << mimetype << "preferredType=" << preferredType;
|
qClipboardDebug() << "mimetype=" << mimetype << "preferredType=" << preferredType;
|
||||||
if (is_clipboard_format_present(mimetype.toUtf8().constData()) != 0)
|
if (is_clipboard_format_present(mimetype.toUtf8().constData()) != 0)
|
||||||
return QMimeData::retrieveData(mimetype, preferredType);
|
return QMimeData::retrieveData(mimetype, preferredType);
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ private Q_SLOTS:
|
|||||||
void releaseOwnership()
|
void releaseOwnership()
|
||||||
{
|
{
|
||||||
if (m_userMimeData) {
|
if (m_userMimeData) {
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "user data formats=" << m_userMimeData->formats() << "system formats=" << formats();
|
qClipboardDebug() << "user data formats=" << m_userMimeData->formats() << "system formats=" << formats();
|
||||||
delete m_userMimeData;
|
delete m_userMimeData;
|
||||||
m_userMimeData = 0;
|
m_userMimeData = 0;
|
||||||
m_clipboard->emitChanged(QClipboard::Clipboard);
|
m_clipboard->emitChanged(QClipboard::Clipboard);
|
||||||
@ -195,7 +195,7 @@ void QQnxClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QStringList formats = data->formats();
|
const QStringList formats = data->formats();
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "formats=" << formats;
|
qClipboardDebug() << "formats=" << formats;
|
||||||
|
|
||||||
Q_FOREACH (const QString &format, formats) {
|
Q_FOREACH (const QString &format, formats) {
|
||||||
const QByteArray buf = data->data(format);
|
const QByteArray buf = data->data(format);
|
||||||
@ -204,7 +204,7 @@ void QQnxClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
int ret = set_clipboard_data(format.toUtf8().data(), buf.size(), buf.data());
|
int ret = set_clipboard_data(format.toUtf8().data(), buf.size(), buf.data());
|
||||||
qClipboardDebug() << Q_FUNC_INFO << "set " << format << "to clipboard, size=" << buf.size() << ";ret=" << ret;
|
qClipboardDebug() << "set " << format << "to clipboard, size=" << buf.size() << ";ret=" << ret;
|
||||||
if (ret)
|
if (ret)
|
||||||
m_mimeData->addFormatToCheck(format);
|
m_mimeData->addFormatToCheck(format);
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ void QQnxEglWindow::destroyEGLSurface()
|
|||||||
|
|
||||||
void QQnxEglWindow::swapEGLBuffers()
|
void QQnxEglWindow::swapEGLBuffers()
|
||||||
{
|
{
|
||||||
qEglWindowDebug() << Q_FUNC_INFO;
|
qEglWindowDebug();
|
||||||
// Set current rendering API
|
// Set current rendering API
|
||||||
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
||||||
if (eglResult != EGL_TRUE)
|
if (eglResult != EGL_TRUE)
|
||||||
|
@ -69,7 +69,7 @@ QQnxFileDialogHelper::~QQnxFileDialogHelper()
|
|||||||
|
|
||||||
void QQnxFileDialogHelper::exec()
|
void QQnxFileDialogHelper::exec()
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
|
|
||||||
// Clear any previous results
|
// Clear any previous results
|
||||||
m_dialog->setDirectories(QStringList());
|
m_dialog->setDirectories(QStringList());
|
||||||
@ -85,7 +85,7 @@ bool QQnxFileDialogHelper::show(Qt::WindowFlags flags, Qt::WindowModality modali
|
|||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
Q_UNUSED(modality);
|
Q_UNUSED(modality);
|
||||||
|
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
|
|
||||||
// Create dialog
|
// Create dialog
|
||||||
const QSharedPointer<QFileDialogOptions> &opts = options();
|
const QSharedPointer<QFileDialogOptions> &opts = options();
|
||||||
@ -125,13 +125,13 @@ bool QQnxFileDialogHelper::show(Qt::WindowFlags flags, Qt::WindowModality modali
|
|||||||
|
|
||||||
void QQnxFileDialogHelper::hide()
|
void QQnxFileDialogHelper::hide()
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
m_dialog->close();
|
m_dialog->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QQnxFileDialogHelper::defaultNameFilterDisables() const
|
bool QQnxFileDialogHelper::defaultNameFilterDisables() const
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ void QQnxFileDialogHelper::setDirectory(const QUrl &directory)
|
|||||||
|
|
||||||
QUrl QQnxFileDialogHelper::directory() const
|
QUrl QQnxFileDialogHelper::directory() const
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
if (!m_dialog->directories().isEmpty())
|
if (!m_dialog->directories().isEmpty())
|
||||||
return QUrl::fromLocalFile(m_dialog->directories().first());
|
return QUrl::fromLocalFile(m_dialog->directories().first());
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ void QQnxFileDialogHelper::selectFile(const QUrl &fileName)
|
|||||||
|
|
||||||
QList<QUrl> QQnxFileDialogHelper::selectedFiles() const
|
QList<QUrl> QQnxFileDialogHelper::selectedFiles() const
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
QList<QUrl> urls;
|
QList<QUrl> urls;
|
||||||
QStringList files = m_dialog->selectedFiles();
|
QStringList files = m_dialog->selectedFiles();
|
||||||
Q_FOREACH (const QString &file, files)
|
Q_FOREACH (const QString &file, files)
|
||||||
@ -167,12 +167,12 @@ QList<QUrl> QQnxFileDialogHelper::selectedFiles() const
|
|||||||
void QQnxFileDialogHelper::setFilter()
|
void QQnxFileDialogHelper::setFilter()
|
||||||
{
|
{
|
||||||
// No native api to support setting a filter from QDir::Filters
|
// No native api to support setting a filter from QDir::Filters
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxFileDialogHelper::selectNameFilter(const QString &filter)
|
void QQnxFileDialogHelper::selectNameFilter(const QString &filter)
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO << "filter =" << filter;
|
qFileDialogHelperDebug() << "filter =" << filter;
|
||||||
setNameFilter(filter);
|
setNameFilter(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ QString QQnxFileDialogHelper::selectedNameFilter() const
|
|||||||
{
|
{
|
||||||
// For now there is no way for the user to change the selected filter
|
// For now there is no way for the user to change the selected filter
|
||||||
// so this just reflects what the developer has set programmatically.
|
// so this just reflects what the developer has set programmatically.
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO;
|
qFileDialogHelperDebug();
|
||||||
return m_selectedFilter;
|
return m_selectedFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,14 +194,14 @@ void QQnxFileDialogHelper::emitSignals()
|
|||||||
|
|
||||||
void QQnxFileDialogHelper::setNameFilter(const QString &filter)
|
void QQnxFileDialogHelper::setNameFilter(const QString &filter)
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO << "filter =" << filter;
|
qFileDialogHelperDebug() << "filter =" << filter;
|
||||||
|
|
||||||
setNameFilters(QPlatformFileDialogHelper::cleanFilterList(filter));
|
setNameFilters(QPlatformFileDialogHelper::cleanFilterList(filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxFileDialogHelper::setNameFilters(const QStringList &filters)
|
void QQnxFileDialogHelper::setNameFilters(const QStringList &filters)
|
||||||
{
|
{
|
||||||
qFileDialogHelperDebug() << Q_FUNC_INFO << "filters =" << filters;
|
qFileDialogHelperDebug() << "filters =" << filters;
|
||||||
|
|
||||||
Q_ASSERT(!filters.isEmpty());
|
Q_ASSERT(!filters.isEmpty());
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
|
|||||||
m_glContext(glContext),
|
m_glContext(glContext),
|
||||||
m_currentEglSurface(EGL_NO_SURFACE)
|
m_currentEglSurface(EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
QSurfaceFormat format = m_glContext->format();
|
QSurfaceFormat format = m_glContext->format();
|
||||||
|
|
||||||
// Set current rendering API
|
// Set current rendering API
|
||||||
@ -132,7 +132,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
|
|||||||
|
|
||||||
QQnxGLContext::~QQnxGLContext()
|
QQnxGLContext::~QQnxGLContext()
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
// Cleanup EGL context if it exists
|
// Cleanup EGL context if it exists
|
||||||
if (m_eglContext != EGL_NO_CONTEXT)
|
if (m_eglContext != EGL_NO_CONTEXT)
|
||||||
@ -166,7 +166,7 @@ EGLenum QQnxGLContext::checkEGLError(const char *msg)
|
|||||||
|
|
||||||
void QQnxGLContext::initializeContext()
|
void QQnxGLContext::initializeContext()
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
// Initialize connection to EGL
|
// Initialize connection to EGL
|
||||||
ms_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
ms_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||||
@ -184,7 +184,7 @@ void QQnxGLContext::initializeContext()
|
|||||||
|
|
||||||
void QQnxGLContext::shutdownContext()
|
void QQnxGLContext::shutdownContext()
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
// Close connection to EGL
|
// Close connection to EGL
|
||||||
eglTerminate(ms_eglDisplay);
|
eglTerminate(ms_eglDisplay);
|
||||||
@ -192,7 +192,7 @@ void QQnxGLContext::shutdownContext()
|
|||||||
|
|
||||||
bool QQnxGLContext::makeCurrent(QPlatformSurface *surface)
|
bool QQnxGLContext::makeCurrent(QPlatformSurface *surface)
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface);
|
Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface);
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ bool QQnxGLContext::makeCurrent(QPlatformSurface *surface)
|
|||||||
|
|
||||||
void QQnxGLContext::doneCurrent()
|
void QQnxGLContext::doneCurrent()
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
// set current rendering API
|
// set current rendering API
|
||||||
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
||||||
@ -238,7 +238,7 @@ void QQnxGLContext::doneCurrent()
|
|||||||
|
|
||||||
void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
|
void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
QQnxEglWindow *platformWindow = dynamic_cast<QQnxEglWindow*>(surface);
|
QQnxEglWindow *platformWindow = dynamic_cast<QQnxEglWindow*>(surface);
|
||||||
if (!platformWindow)
|
if (!platformWindow)
|
||||||
return;
|
return;
|
||||||
@ -248,7 +248,7 @@ void QQnxGLContext::swapBuffers(QPlatformSurface *surface)
|
|||||||
|
|
||||||
QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName)
|
QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName)
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
// Set current rendering API
|
// Set current rendering API
|
||||||
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API);
|
||||||
@ -270,7 +270,7 @@ EGLDisplay QQnxGLContext::getEglDisplay() {
|
|||||||
|
|
||||||
EGLint *QQnxGLContext::contextAttrs(const QSurfaceFormat &format)
|
EGLint *QQnxGLContext::contextAttrs(const QSurfaceFormat &format)
|
||||||
{
|
{
|
||||||
qGLContextDebug() << Q_FUNC_INFO;
|
qGLContextDebug();
|
||||||
|
|
||||||
// Choose EGL settings based on OpenGL version
|
// Choose EGL settings based on OpenGL version
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if defined(QT_OPENGL_ES_2)
|
||||||
|
@ -191,7 +191,7 @@ static int32_t ic_begin_batch_edit(input_session_t *ic)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_commit_text(input_session_t *ic, spannable_string_t *text, int32_t new_cursor_position)
|
static int32_t ic_commit_text(input_session_t *ic, spannable_string_t *text, int32_t new_cursor_position)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfCommitText);
|
QQnxImfRequest event(ic, ImfCommitText);
|
||||||
event.ct.text = text;
|
event.ct.text = text;
|
||||||
@ -206,7 +206,7 @@ static int32_t ic_commit_text(input_session_t *ic, spannable_string_t *text, int
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_delete_surrounding_text(input_session_t *ic, int32_t left_length, int32_t right_length)
|
static int32_t ic_delete_surrounding_text(input_session_t *ic, int32_t left_length, int32_t right_length)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfDeleteSurroundingText);
|
QQnxImfRequest event(ic, ImfDeleteSurroundingText);
|
||||||
event.dst.left_length = left_length;
|
event.dst.left_length = left_length;
|
||||||
@ -230,7 +230,7 @@ static int32_t ic_end_batch_edit(input_session_t *ic)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_finish_composing_text(input_session_t *ic)
|
static int32_t ic_finish_composing_text(input_session_t *ic)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfFinishComposingText);
|
QQnxImfRequest event(ic, ImfFinishComposingText);
|
||||||
event.fct.result = -1;
|
event.fct.result = -1;
|
||||||
@ -243,7 +243,7 @@ static int32_t ic_finish_composing_text(input_session_t *ic)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_get_cursor_position(input_session_t *ic)
|
static int32_t ic_get_cursor_position(input_session_t *ic)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfGetCursorPosition);
|
QQnxImfRequest event(ic, ImfGetCursorPosition);
|
||||||
event.gcp.result = -1;
|
event.gcp.result = -1;
|
||||||
@ -256,7 +256,7 @@ static int32_t ic_get_cursor_position(input_session_t *ic)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static spannable_string_t *ic_get_text_after_cursor(input_session_t *ic, int32_t n, int32_t flags)
|
static spannable_string_t *ic_get_text_after_cursor(input_session_t *ic, int32_t n, int32_t flags)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfGetTextAfterCursor);
|
QQnxImfRequest event(ic, ImfGetTextAfterCursor);
|
||||||
event.gtac.n = n;
|
event.gtac.n = n;
|
||||||
@ -271,7 +271,7 @@ static spannable_string_t *ic_get_text_after_cursor(input_session_t *ic, int32_t
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static spannable_string_t *ic_get_text_before_cursor(input_session_t *ic, int32_t n, int32_t flags)
|
static spannable_string_t *ic_get_text_before_cursor(input_session_t *ic, int32_t n, int32_t flags)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfGetTextBeforeCursor);
|
QQnxImfRequest event(ic, ImfGetTextBeforeCursor);
|
||||||
event.gtac.n = n;
|
event.gtac.n = n;
|
||||||
@ -286,7 +286,7 @@ static spannable_string_t *ic_get_text_before_cursor(input_session_t *ic, int32_
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_send_event(input_session_t *ic, event_t *event)
|
static int32_t ic_send_event(input_session_t *ic, event_t *event)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest imfEvent(ic, ImfSendEvent);
|
QQnxImfRequest imfEvent(ic, ImfSendEvent);
|
||||||
imfEvent.sae.event = event;
|
imfEvent.sae.event = event;
|
||||||
@ -300,7 +300,7 @@ static int32_t ic_send_event(input_session_t *ic, event_t *event)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_send_async_event(input_session_t *ic, event_t *event)
|
static int32_t ic_send_async_event(input_session_t *ic, event_t *event)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
// There's no difference from our point of view between ic_send_event & ic_send_async_event
|
// There's no difference from our point of view between ic_send_event & ic_send_async_event
|
||||||
QQnxImfRequest imfEvent(ic, ImfSendEvent);
|
QQnxImfRequest imfEvent(ic, ImfSendEvent);
|
||||||
@ -315,7 +315,7 @@ static int32_t ic_send_async_event(input_session_t *ic, event_t *event)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_set_composing_region(input_session_t *ic, int32_t start, int32_t end)
|
static int32_t ic_set_composing_region(input_session_t *ic, int32_t start, int32_t end)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfSetComposingRegion);
|
QQnxImfRequest event(ic, ImfSetComposingRegion);
|
||||||
event.scr.start = start;
|
event.scr.start = start;
|
||||||
@ -331,7 +331,7 @@ static int32_t ic_set_composing_region(input_session_t *ic, int32_t start, int32
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_set_composing_text(input_session_t *ic, spannable_string_t *text, int32_t new_cursor_position)
|
static int32_t ic_set_composing_text(input_session_t *ic, spannable_string_t *text, int32_t new_cursor_position)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfSetComposingText);
|
QQnxImfRequest event(ic, ImfSetComposingText);
|
||||||
event.sct.text = text;
|
event.sct.text = text;
|
||||||
@ -346,7 +346,7 @@ static int32_t ic_set_composing_text(input_session_t *ic, spannable_string_t *te
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_is_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
static int32_t ic_is_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfIsTextSelected);
|
QQnxImfRequest event(ic, ImfIsTextSelected);
|
||||||
event.its.pIsSelected = pIsSelected;
|
event.its.pIsSelected = pIsSelected;
|
||||||
@ -360,7 +360,7 @@ static int32_t ic_is_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
|||||||
// See comment at beginning of namespace declaration for general information
|
// See comment at beginning of namespace declaration for general information
|
||||||
static int32_t ic_is_all_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
static int32_t ic_is_all_text_selected(input_session_t* ic, int32_t* pIsSelected)
|
||||||
{
|
{
|
||||||
qInputContextIMFRequestDebug() << Q_FUNC_INFO;
|
qInputContextIMFRequestDebug();
|
||||||
|
|
||||||
QQnxImfRequest event(ic, ImfIsAllTextSelected);
|
QQnxImfRequest event(ic, ImfIsAllTextSelected);
|
||||||
event.its.pIsSelected = pIsSelected;
|
event.its.pIsSelected = pIsSelected;
|
||||||
@ -496,7 +496,7 @@ initEvent(event_t *pEvent, const input_session_t *pSession, EventType eventType,
|
|||||||
|
|
||||||
static spannable_string_t *toSpannableString(const QString &text)
|
static spannable_string_t *toSpannableString(const QString &text)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << text;
|
qInputContextDebug() << text;
|
||||||
|
|
||||||
spannable_string_t *pString = static_cast<spannable_string_t *>(malloc(sizeof(spannable_string_t)));
|
spannable_string_t *pString = static_cast<spannable_string_t *>(malloc(sizeof(spannable_string_t)));
|
||||||
pString->str = static_cast<wchar_t *>(malloc(sizeof(wchar_t) * text.length() + 1));
|
pString->str = static_cast<wchar_t *>(malloc(sizeof(wchar_t) * text.length() + 1));
|
||||||
@ -539,7 +539,7 @@ static bool imfAvailable()
|
|||||||
p_vkb_init_selection_service = (int32_t (*)())dlsym(handle, "vkb_init_selection_service");
|
p_vkb_init_selection_service = (int32_t (*)())dlsym(handle, "vkb_init_selection_service");
|
||||||
p_ictrl_get_num_active_sessions = (int32_t (*)())dlsym(handle, "ictrl_get_num_active_sessions");
|
p_ictrl_get_num_active_sessions = (int32_t (*)())dlsym(handle, "ictrl_get_num_active_sessions");
|
||||||
} else {
|
} else {
|
||||||
qCritical() << Q_FUNC_INFO << "libinput_client.so.1 is not present - IMF services are disabled.";
|
qCritical("libinput_client.so.1 is not present - IMF services are disabled.");
|
||||||
s_imfDisabled = true;
|
s_imfDisabled = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -550,7 +550,7 @@ static bool imfAvailable()
|
|||||||
p_ictrl_open_session = 0;
|
p_ictrl_open_session = 0;
|
||||||
p_ictrl_dispatch_event = 0;
|
p_ictrl_dispatch_event = 0;
|
||||||
s_imfDisabled = true;
|
s_imfDisabled = true;
|
||||||
qCritical() << Q_FUNC_INFO << "libinput_client.so.1 did not contain the correct symbols, library mismatch? IMF services are disabled.";
|
qCritical("libinput_client.so.1 did not contain the correct symbols, library mismatch? IMF services are disabled.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -571,7 +571,7 @@ QQnxInputContext::QQnxInputContext(QQnxIntegration *integration, QQnxAbstractVir
|
|||||||
m_integration(integration),
|
m_integration(integration),
|
||||||
m_virtualKeyboard(keyboard)
|
m_virtualKeyboard(keyboard)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
if (!imfAvailable())
|
if (!imfAvailable())
|
||||||
return;
|
return;
|
||||||
@ -594,7 +594,7 @@ QQnxInputContext::QQnxInputContext(QQnxIntegration *integration, QQnxAbstractVir
|
|||||||
|
|
||||||
QQnxInputContext::~QQnxInputContext()
|
QQnxInputContext::~QQnxInputContext()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
Q_ASSERT(sInputContextInstance == this);
|
Q_ASSERT(sInputContextInstance == this);
|
||||||
sInputContextInstance = 0;
|
sInputContextInstance = 0;
|
||||||
@ -669,7 +669,7 @@ void QQnxInputContext::processImfEvent(QQnxImfRequest *imfEvent)
|
|||||||
|
|
||||||
bool QQnxInputContext::filterEvent( const QEvent *event )
|
bool QQnxInputContext::filterEvent( const QEvent *event )
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << event;
|
qInputContextDebug() << event;
|
||||||
|
|
||||||
switch (event->type()) {
|
switch (event->type()) {
|
||||||
case QEvent::CloseSoftwareInputPanel:
|
case QEvent::CloseSoftwareInputPanel:
|
||||||
@ -692,19 +692,19 @@ QRectF QQnxInputContext::keyboardRect() const
|
|||||||
|
|
||||||
void QQnxInputContext::reset()
|
void QQnxInputContext::reset()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
endComposition();
|
endComposition();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxInputContext::commit()
|
void QQnxInputContext::commit()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
endComposition();
|
endComposition();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << queries;
|
qInputContextDebug() << queries;
|
||||||
|
|
||||||
if (queries & Qt::ImCursorPosition) {
|
if (queries & Qt::ImCursorPosition) {
|
||||||
int lastCaret = m_caretPosition;
|
int lastCaret = m_caretPosition;
|
||||||
@ -716,7 +716,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
|||||||
initEvent(&caretEvent.event, sInputSession, EVENT_CARET, CARET_POS_CHANGED, sizeof(caretEvent));
|
initEvent(&caretEvent.event, sInputSession, EVENT_CARET, CARET_POS_CHANGED, sizeof(caretEvent));
|
||||||
caretEvent.old_pos = lastCaret;
|
caretEvent.old_pos = lastCaret;
|
||||||
caretEvent.new_pos = m_caretPosition;
|
caretEvent.new_pos = m_caretPosition;
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition;
|
qInputContextDebug() << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition;
|
||||||
p_ictrl_dispatch_event(&caretEvent.event);
|
p_ictrl_dispatch_event(&caretEvent.event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -724,7 +724,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries)
|
|||||||
|
|
||||||
void QQnxInputContext::closeSession()
|
void QQnxInputContext::closeSession()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
if (!imfAvailable())
|
if (!imfAvailable())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -746,7 +746,7 @@ bool QQnxInputContext::openSession()
|
|||||||
closeSession();
|
closeSession();
|
||||||
sInputSession = p_ictrl_open_session(&ic_funcs);
|
sInputSession = p_ictrl_open_session(&ic_funcs);
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
return sInputSession != 0;
|
return sInputSession != 0;
|
||||||
}
|
}
|
||||||
@ -770,7 +770,7 @@ bool QQnxInputContext::hasSelectedText()
|
|||||||
|
|
||||||
bool QQnxInputContext::dispatchRequestSoftwareInputPanel()
|
bool QQnxInputContext::dispatchRequestSoftwareInputPanel()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "requesting keyboard" << m_inputPanelVisible;
|
qInputContextDebug() << "requesting keyboard" << m_inputPanelVisible;
|
||||||
m_virtualKeyboard.showKeyboard();
|
m_virtualKeyboard.showKeyboard();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -778,7 +778,7 @@ bool QQnxInputContext::dispatchRequestSoftwareInputPanel()
|
|||||||
|
|
||||||
bool QQnxInputContext::dispatchCloseSoftwareInputPanel()
|
bool QQnxInputContext::dispatchCloseSoftwareInputPanel()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "hiding keyboard" << m_inputPanelVisible;
|
qInputContextDebug() << "hiding keyboard" << m_inputPanelVisible;
|
||||||
m_virtualKeyboard.hideKeyboard();
|
m_virtualKeyboard.hideKeyboard();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -824,7 +824,7 @@ bool QQnxInputContext::dispatchFocusGainEvent(int inputHints)
|
|||||||
focusEvent.style |= IMF_EMAIL_TYPE;
|
focusEvent.style |= IMF_EMAIL_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event focus gain style:" << focusEvent.style;
|
qInputContextDebug() << "ictrl_dispatch_event focus gain style:" << focusEvent.style;
|
||||||
|
|
||||||
p_ictrl_dispatch_event((event_t *)&focusEvent);
|
p_ictrl_dispatch_event((event_t *)&focusEvent);
|
||||||
|
|
||||||
@ -834,7 +834,7 @@ bool QQnxInputContext::dispatchFocusGainEvent(int inputHints)
|
|||||||
void QQnxInputContext::dispatchFocusLossEvent()
|
void QQnxInputContext::dispatchFocusLossEvent()
|
||||||
{
|
{
|
||||||
if (hasSession()) {
|
if (hasSession()) {
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event focus lost";
|
qInputContextDebug("ictrl_dispatch_event focus lost");
|
||||||
|
|
||||||
focus_event_t focusEvent;
|
focus_event_t focusEvent;
|
||||||
initEvent(&focusEvent.event, sInputSession, EVENT_FOCUS, FOCUS_LOST, sizeof(focusEvent));
|
initEvent(&focusEvent.event, sInputSession, EVENT_FOCUS, FOCUS_LOST, sizeof(focusEvent));
|
||||||
@ -909,7 +909,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan
|
|||||||
navigation_event_t navEvent;
|
navigation_event_t navEvent;
|
||||||
initEvent(&navEvent.event, sInputSession, EVENT_NAVIGATION, key, sizeof(navEvent));
|
initEvent(&navEvent.event, sInputSession, EVENT_NAVIGATION, key, sizeof(navEvent));
|
||||||
navEvent.magnitude = 1;
|
navEvent.magnitude = 1;
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even navigation" << key;
|
qInputContextDebug() << "ictrl_dispatch_even navigation" << key;
|
||||||
p_ictrl_dispatch_event(&navEvent.event);
|
p_ictrl_dispatch_event(&navEvent.event);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -922,7 +922,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan
|
|||||||
keyEvent.sequence_id = sequenceId;
|
keyEvent.sequence_id = sequenceId;
|
||||||
|
|
||||||
p_ictrl_dispatch_event(&keyEvent.event);
|
p_ictrl_dispatch_event(&keyEvent.event);
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even key" << key;
|
qInputContextDebug() << "ictrl_dispatch_even key" << key;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -938,7 +938,7 @@ void QQnxInputContext::updateCursorPosition()
|
|||||||
QCoreApplication::sendEvent(input, &query);
|
QCoreApplication::sendEvent(input, &query);
|
||||||
m_caretPosition = query.value(Qt::ImCursorPosition).toInt();
|
m_caretPosition = query.value(Qt::ImCursorPosition).toInt();
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO << m_caretPosition;
|
qInputContextDebug() << m_caretPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxInputContext::endComposition()
|
void QQnxInputContext::endComposition()
|
||||||
@ -951,7 +951,7 @@ void QQnxInputContext::endComposition()
|
|||||||
if (hasSession()) {
|
if (hasSession()) {
|
||||||
action_event_t actionEvent;
|
action_event_t actionEvent;
|
||||||
initEvent(&actionEvent.event, sInputSession, EVENT_ACTION, ACTION_END_COMPOSITION, sizeof(actionEvent));
|
initEvent(&actionEvent.event, sInputSession, EVENT_ACTION, ACTION_END_COMPOSITION, sizeof(actionEvent));
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even end composition";
|
qInputContextDebug("ictrl_dispatch_even end composition");
|
||||||
p_ictrl_dispatch_event(&actionEvent.event);
|
p_ictrl_dispatch_event(&actionEvent.event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -968,7 +968,7 @@ void QQnxInputContext::updateComposition(spannable_string_t *text, int32_t new_c
|
|||||||
m_composingText = QString::fromWCharArray(text->str, text->length);
|
m_composingText = QString::fromWCharArray(text->str, text->length);
|
||||||
m_isComposing = true;
|
m_isComposing = true;
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO << m_composingText << new_cursor_position;
|
qInputContextDebug() << m_composingText << new_cursor_position;
|
||||||
|
|
||||||
QList<QInputMethodEvent::Attribute> attributes;
|
QList<QInputMethodEvent::Attribute> attributes;
|
||||||
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor,
|
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor,
|
||||||
@ -1017,7 +1017,7 @@ void QQnxInputContext::finishComposingText()
|
|||||||
QObject *input = qGuiApp->focusObject();
|
QObject *input = qGuiApp->focusObject();
|
||||||
|
|
||||||
if (input) {
|
if (input) {
|
||||||
qInputContextDebug() << Q_FUNC_INFO << m_composingText;
|
qInputContextDebug() << m_composingText;
|
||||||
|
|
||||||
QInputMethodEvent event;
|
QInputMethodEvent event;
|
||||||
event.setCommitString(m_composingText);
|
event.setCommitString(m_composingText);
|
||||||
@ -1082,13 +1082,13 @@ int32_t QQnxInputContext::processEvent(event_t *event)
|
|||||||
int32_t result = -1;
|
int32_t result = -1;
|
||||||
switch (event->event_type) {
|
switch (event->event_type) {
|
||||||
case EVENT_SPELL_CHECK: {
|
case EVENT_SPELL_CHECK: {
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "EVENT_SPELL_CHECK";
|
qInputContextDebug("EVENT_SPELL_CHECK");
|
||||||
result = handleSpellCheck(reinterpret_cast<spell_check_event_t *>(event));
|
result = handleSpellCheck(reinterpret_cast<spell_check_event_t *>(event));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EVENT_NAVIGATION: {
|
case EVENT_NAVIGATION: {
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "EVENT_NAVIGATION";
|
qInputContextDebug("EVENT_NAVIGATION");
|
||||||
|
|
||||||
int key = event->event_id == NAVIGATE_UP ? KEYCODE_UP :
|
int key = event->event_id == NAVIGATE_UP ? KEYCODE_UP :
|
||||||
event->event_id == NAVIGATE_DOWN ? KEYCODE_DOWN :
|
event->event_id == NAVIGATE_DOWN ? KEYCODE_DOWN :
|
||||||
@ -1111,7 +1111,7 @@ int32_t QQnxInputContext::processEvent(event_t *event)
|
|||||||
int flags = KEY_SYM_VALID | KEY_CAP_VALID;
|
int flags = KEY_SYM_VALID | KEY_CAP_VALID;
|
||||||
if (event->event_id == IMF_KEY_DOWN)
|
if (event->event_id == IMF_KEY_DOWN)
|
||||||
flags |= KEY_DOWN;
|
flags |= KEY_DOWN;
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "EVENT_KEY" << flags << keySym;
|
qInputContextDebug() << "EVENT_KEY" << flags << keySym;
|
||||||
QQnxScreenEventHandler::injectKeyboardEvent(flags, keySym, modifiers, 0, keyCap);
|
QQnxScreenEventHandler::injectKeyboardEvent(flags, keySym, modifiers, 0, keyCap);
|
||||||
result = 0;
|
result = 0;
|
||||||
break;
|
break;
|
||||||
@ -1127,10 +1127,10 @@ int32_t QQnxInputContext::processEvent(event_t *event)
|
|||||||
case EVENT_USER_ACTION:
|
case EVENT_USER_ACTION:
|
||||||
case EVENT_STROKE:
|
case EVENT_STROKE:
|
||||||
case EVENT_INVOKE_LATER:
|
case EVENT_INVOKE_LATER:
|
||||||
qCritical() << Q_FUNC_INFO << "Unsupported event type: " << event->event_type;
|
qCritical() << "Unsupported event type: " << event->event_type;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qCritical() << Q_FUNC_INFO << "Unknown event type: " << event->event_type;
|
qCritical() << "Unknown event type: " << event->event_type;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1151,7 +1151,7 @@ int32_t QQnxInputContext::onCommitText(spannable_string_t *text, int32_t new_cur
|
|||||||
|
|
||||||
int32_t QQnxInputContext::onDeleteSurroundingText(int32_t left_length, int32_t right_length)
|
int32_t QQnxInputContext::onDeleteSurroundingText(int32_t left_length, int32_t right_length)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "L:" << left_length << " R:" << right_length;
|
qInputContextDebug() << "L:" << left_length << " R:" << right_length;
|
||||||
|
|
||||||
QObject *input = qGuiApp->focusObject();
|
QObject *input = qGuiApp->focusObject();
|
||||||
if (!input)
|
if (!input)
|
||||||
@ -1182,7 +1182,7 @@ int32_t QQnxInputContext::onFinishComposingText()
|
|||||||
|
|
||||||
int32_t QQnxInputContext::onGetCursorPosition()
|
int32_t QQnxInputContext::onGetCursorPosition()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
QObject *input = qGuiApp->focusObject();
|
QObject *input = qGuiApp->focusObject();
|
||||||
if (!input)
|
if (!input)
|
||||||
@ -1196,7 +1196,7 @@ int32_t QQnxInputContext::onGetCursorPosition()
|
|||||||
spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t flags)
|
spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags);
|
Q_UNUSED(flags);
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
QObject *input = qGuiApp->focusObject();
|
QObject *input = qGuiApp->focusObject();
|
||||||
if (!input)
|
if (!input)
|
||||||
@ -1213,7 +1213,7 @@ spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t fl
|
|||||||
spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t flags)
|
spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t flags)
|
||||||
{
|
{
|
||||||
Q_UNUSED(flags);
|
Q_UNUSED(flags);
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
QObject *input = qGuiApp->focusObject();
|
QObject *input = qGuiApp->focusObject();
|
||||||
if (!input)
|
if (!input)
|
||||||
@ -1232,7 +1232,7 @@ spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t f
|
|||||||
|
|
||||||
int32_t QQnxInputContext::onSendEvent(event_t *event)
|
int32_t QQnxInputContext::onSendEvent(event_t *event)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
|
|
||||||
return processEvent(event);
|
return processEvent(event);
|
||||||
}
|
}
|
||||||
@ -1248,7 +1248,7 @@ int32_t QQnxInputContext::onSetComposingRegion(int32_t start, int32_t end)
|
|||||||
QString text = query.value(Qt::ImSurroundingText).toString();
|
QString text = query.value(Qt::ImSurroundingText).toString();
|
||||||
m_caretPosition = query.value(Qt::ImCursorPosition).toInt();
|
m_caretPosition = query.value(Qt::ImCursorPosition).toInt();
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO << text;
|
qInputContextDebug() << text;
|
||||||
|
|
||||||
m_isUpdatingText = true;
|
m_isUpdatingText = true;
|
||||||
|
|
||||||
@ -1291,7 +1291,7 @@ int32_t QQnxInputContext::onIsTextSelected(int32_t* pIsSelected)
|
|||||||
{
|
{
|
||||||
*pIsSelected = hasSelectedText();
|
*pIsSelected = hasSelectedText();
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO << *pIsSelected;
|
qInputContextDebug() << *pIsSelected;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1307,20 +1307,20 @@ int32_t QQnxInputContext::onIsAllTextSelected(int32_t* pIsSelected)
|
|||||||
|
|
||||||
*pIsSelected = query.value(Qt::ImSurroundingText).toString().length() == query.value(Qt::ImCurrentSelection).toString().length();
|
*pIsSelected = query.value(Qt::ImSurroundingText).toString().length() == query.value(Qt::ImCurrentSelection).toString().length();
|
||||||
|
|
||||||
qInputContextDebug() << Q_FUNC_INFO << *pIsSelected;
|
qInputContextDebug() << *pIsSelected;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxInputContext::showInputPanel()
|
void QQnxInputContext::showInputPanel()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
dispatchRequestSoftwareInputPanel();
|
dispatchRequestSoftwareInputPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxInputContext::hideInputPanel()
|
void QQnxInputContext::hideInputPanel()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
dispatchCloseSoftwareInputPanel();
|
dispatchCloseSoftwareInputPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1336,7 +1336,7 @@ QLocale QQnxInputContext::locale() const
|
|||||||
|
|
||||||
void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "visible=" << visible;
|
qInputContextDebug() << "visible=" << visible;
|
||||||
if (m_inputPanelVisible != visible) {
|
if (m_inputPanelVisible != visible) {
|
||||||
m_inputPanelVisible = visible;
|
m_inputPanelVisible = visible;
|
||||||
emitInputPanelVisibleChanged();
|
emitInputPanelVisibleChanged();
|
||||||
@ -1345,7 +1345,7 @@ void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
|||||||
|
|
||||||
void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "locale=" << locale;
|
qInputContextDebug() << "locale=" << locale;
|
||||||
if (m_inputPanelLocale != locale) {
|
if (m_inputPanelLocale != locale) {
|
||||||
m_inputPanelLocale = locale;
|
m_inputPanelLocale = locale;
|
||||||
emitLocaleChanged();
|
emitLocaleChanged();
|
||||||
@ -1354,7 +1354,7 @@ void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
|||||||
|
|
||||||
void QQnxInputContext::setHighlightColor(int index, const QColor &color)
|
void QQnxInputContext::setHighlightColor(int index, const QColor &color)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "setHighlightColor" << index << color << qGuiApp->focusObject();
|
qInputContextDebug() << "setHighlightColor" << index << color << qGuiApp->focusObject();
|
||||||
|
|
||||||
if (!sInputContextInstance)
|
if (!sInputContextInstance)
|
||||||
return;
|
return;
|
||||||
@ -1373,7 +1373,7 @@ void QQnxInputContext::setHighlightColor(int index, const QColor &color)
|
|||||||
|
|
||||||
void QQnxInputContext::setFocusObject(QObject *object)
|
void QQnxInputContext::setFocusObject(QObject *object)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "input item=" << object;
|
qInputContextDebug() << "input item=" << object;
|
||||||
|
|
||||||
// Ensure the colors are reset if we've a change in focus object
|
// Ensure the colors are reset if we've a change in focus object
|
||||||
setHighlightColor(-1, QColor());
|
setHighlightColor(-1, QColor());
|
||||||
@ -1403,7 +1403,7 @@ void QQnxInputContext::setFocusObject(QObject *object)
|
|||||||
|
|
||||||
bool QQnxInputContext::checkSpelling(const QString &text, void *context, void (*spellCheckDone)(void *context, const QString &text, const QList<int> &indices))
|
bool QQnxInputContext::checkSpelling(const QString &text, void *context, void (*spellCheckDone)(void *context, const QString &text, const QList<int> &indices))
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "text" << text;
|
qInputContextDebug() << "text" << text;
|
||||||
|
|
||||||
if (!imfAvailable())
|
if (!imfAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
@ -88,13 +88,13 @@ bool QQnxInputContext::filterEvent( const QEvent *event )
|
|||||||
|
|
||||||
if (event->type() == QEvent::CloseSoftwareInputPanel) {
|
if (event->type() == QEvent::CloseSoftwareInputPanel) {
|
||||||
m_virtualKeyboard.hideKeyboard();
|
m_virtualKeyboard.hideKeyboard();
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "hiding virtual keyboard";
|
qInputContextDebug("hiding virtual keyboard");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->type() == QEvent::RequestSoftwareInputPanel) {
|
if (event->type() == QEvent::RequestSoftwareInputPanel) {
|
||||||
m_virtualKeyboard.showKeyboard();
|
m_virtualKeyboard.showKeyboard();
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "requesting virtual keyboard";
|
qInputContextDebug("requesting virtual keyboard");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,13 +121,13 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan
|
|||||||
|
|
||||||
void QQnxInputContext::showInputPanel()
|
void QQnxInputContext::showInputPanel()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
m_virtualKeyboard.showKeyboard();
|
m_virtualKeyboard.showKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxInputContext::hideInputPanel()
|
void QQnxInputContext::hideInputPanel()
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO;
|
qInputContextDebug();
|
||||||
m_virtualKeyboard.hideKeyboard();
|
m_virtualKeyboard.hideKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ void QQnxInputContext::keyboardHeightChanged()
|
|||||||
|
|
||||||
void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "visible=" << visible;
|
qInputContextDebug() << "visible=" << visible;
|
||||||
if (m_inputPanelVisible != visible) {
|
if (m_inputPanelVisible != visible) {
|
||||||
m_inputPanelVisible = visible;
|
m_inputPanelVisible = visible;
|
||||||
emitInputPanelVisibleChanged();
|
emitInputPanelVisibleChanged();
|
||||||
@ -157,7 +157,7 @@ void QQnxInputContext::keyboardVisibilityChanged(bool visible)
|
|||||||
|
|
||||||
void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "locale=" << locale;
|
qInputContextDebug() << "locale=" << locale;
|
||||||
if (m_inputPanelLocale != locale) {
|
if (m_inputPanelLocale != locale) {
|
||||||
m_inputPanelLocale = locale;
|
m_inputPanelLocale = locale;
|
||||||
emitLocaleChanged();
|
emitLocaleChanged();
|
||||||
@ -166,7 +166,7 @@ void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale)
|
|||||||
|
|
||||||
void QQnxInputContext::setFocusObject(QObject *object)
|
void QQnxInputContext::setFocusObject(QObject *object)
|
||||||
{
|
{
|
||||||
qInputContextDebug() << Q_FUNC_INFO << "input item=" << object;
|
qInputContextDebug() << "input item=" << object;
|
||||||
|
|
||||||
if (!inputMethodAccepted()) {
|
if (!inputMethodAccepted()) {
|
||||||
if (m_inputPanelVisible)
|
if (m_inputPanelVisible)
|
||||||
|
@ -164,7 +164,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ms_options = parseOptions(paramList);
|
ms_options = parseOptions(paramList);
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
// Open connection to QNX composition manager
|
// Open connection to QNX composition manager
|
||||||
Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT),
|
Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT),
|
||||||
"Failed to create screen context");
|
"Failed to create screen context");
|
||||||
@ -261,7 +261,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList)
|
|||||||
|
|
||||||
QQnxIntegration::~QQnxIntegration()
|
QQnxIntegration::~QQnxIntegration()
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown begin";
|
qIntegrationDebug("platform plugin shutdown begin");
|
||||||
delete m_nativeInterface;
|
delete m_nativeInterface;
|
||||||
|
|
||||||
#if !defined(QT_NO_DRAGANDDROP)
|
#if !defined(QT_NO_DRAGANDDROP)
|
||||||
@ -325,12 +325,12 @@ QQnxIntegration::~QQnxIntegration()
|
|||||||
// Destroy navigator interface
|
// Destroy navigator interface
|
||||||
delete m_navigator;
|
delete m_navigator;
|
||||||
|
|
||||||
qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown end";
|
qIntegrationDebug("platform plugin shutdown end");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
switch (cap) {
|
switch (cap) {
|
||||||
case MultipleWindows:
|
case MultipleWindows:
|
||||||
case ThreadedPixmaps:
|
case ThreadedPixmaps:
|
||||||
@ -348,7 +348,7 @@ bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
|||||||
|
|
||||||
QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
|
QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
QSurface::SurfaceType surfaceType = window->surfaceType();
|
QSurface::SurfaceType surfaceType = window->surfaceType();
|
||||||
const bool needRootWindow = options() & RootWindow;
|
const bool needRootWindow = options() & RootWindow;
|
||||||
switch (surfaceType) {
|
switch (surfaceType) {
|
||||||
@ -366,14 +366,14 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
|
|||||||
|
|
||||||
QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *window) const
|
QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *window) const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
return new QQnxRasterBackingStore(window);
|
return new QQnxRasterBackingStore(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL)
|
#if !defined(QT_NO_OPENGL)
|
||||||
QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
return new QQnxGLContext(context);
|
return new QQnxGLContext(context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -381,14 +381,14 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont
|
|||||||
#if defined(QQNX_PPS)
|
#if defined(QQNX_PPS)
|
||||||
QPlatformInputContext *QQnxIntegration::inputContext() const
|
QPlatformInputContext *QQnxIntegration::inputContext() const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
return m_inputContext;
|
return m_inputContext;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void QQnxIntegration::moveToScreen(QWindow *window, int screen)
|
void QQnxIntegration::moveToScreen(QWindow *window, int screen)
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO << "w =" << window << ", s =" << screen;
|
qIntegrationDebug() << "w =" << window << ", s =" << screen;
|
||||||
|
|
||||||
// get platform window used by widget
|
// get platform window used by widget
|
||||||
QQnxWindow *platformWindow = static_cast<QQnxWindow *>(window->handle());
|
QQnxWindow *platformWindow = static_cast<QQnxWindow *>(window->handle());
|
||||||
@ -402,7 +402,7 @@ void QQnxIntegration::moveToScreen(QWindow *window, int screen)
|
|||||||
|
|
||||||
QAbstractEventDispatcher *QQnxIntegration::createEventDispatcher() const
|
QAbstractEventDispatcher *QQnxIntegration::createEventDispatcher() const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
|
|
||||||
// We transfer ownersip of the event-dispatcher to QtCoreApplication
|
// We transfer ownersip of the event-dispatcher to QtCoreApplication
|
||||||
QAbstractEventDispatcher *eventDispatcher = m_eventDispatcher;
|
QAbstractEventDispatcher *eventDispatcher = m_eventDispatcher;
|
||||||
@ -419,7 +419,7 @@ QPlatformNativeInterface *QQnxIntegration::nativeInterface() const
|
|||||||
#if !defined(QT_NO_CLIPBOARD)
|
#if !defined(QT_NO_CLIPBOARD)
|
||||||
QPlatformClipboard *QQnxIntegration::clipboard() const
|
QPlatformClipboard *QQnxIntegration::clipboard() const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
|
|
||||||
#if defined(QQNX_PPS)
|
#if defined(QQNX_PPS)
|
||||||
if (!m_clipboard)
|
if (!m_clipboard)
|
||||||
@ -438,7 +438,7 @@ QPlatformDrag *QQnxIntegration::drag() const
|
|||||||
|
|
||||||
QVariant QQnxIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
|
QVariant QQnxIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
if ((hint == ShowIsFullScreen) && (ms_options & FullScreenApplication))
|
if ((hint == ShowIsFullScreen) && (ms_options & FullScreenApplication))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ QStringList QQnxIntegration::themeNames() const
|
|||||||
|
|
||||||
QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const
|
QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO << "name =" << name;
|
qIntegrationDebug() << "name =" << name;
|
||||||
if (name == QBlackberryTheme::name())
|
if (name == QBlackberryTheme::name())
|
||||||
return new QBlackberryTheme(this);
|
return new QBlackberryTheme(this);
|
||||||
return 0;
|
return 0;
|
||||||
@ -467,7 +467,7 @@ QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const
|
|||||||
|
|
||||||
QWindow *QQnxIntegration::window(screen_window_t qnxWindow)
|
QWindow *QQnxIntegration::window(screen_window_t qnxWindow)
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
QMutexLocker locker(&ms_windowMapperMutex);
|
QMutexLocker locker(&ms_windowMapperMutex);
|
||||||
Q_UNUSED(locker);
|
Q_UNUSED(locker);
|
||||||
return ms_windowMapper.value(qnxWindow, 0);
|
return ms_windowMapper.value(qnxWindow, 0);
|
||||||
@ -475,7 +475,7 @@ QWindow *QQnxIntegration::window(screen_window_t qnxWindow)
|
|||||||
|
|
||||||
void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
|
void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
QMutexLocker locker(&ms_windowMapperMutex);
|
QMutexLocker locker(&ms_windowMapperMutex);
|
||||||
Q_UNUSED(locker);
|
Q_UNUSED(locker);
|
||||||
ms_windowMapper.insert(qnxWindow, window);
|
ms_windowMapper.insert(qnxWindow, window);
|
||||||
@ -483,7 +483,7 @@ void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
|
|||||||
|
|
||||||
void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
|
void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
QMutexLocker locker(&ms_windowMapperMutex);
|
QMutexLocker locker(&ms_windowMapperMutex);
|
||||||
Q_UNUSED(locker);
|
Q_UNUSED(locker);
|
||||||
ms_windowMapper.remove(qnxWindow);
|
ms_windowMapper.remove(qnxWindow);
|
||||||
@ -491,7 +491,7 @@ void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
|
|||||||
|
|
||||||
void QQnxIntegration::createDisplays()
|
void QQnxIntegration::createDisplays()
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
// Query number of displays
|
// Query number of displays
|
||||||
int displayCount = 0;
|
int displayCount = 0;
|
||||||
int result = screen_get_context_property_iv(ms_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT,
|
int result = screen_get_context_property_iv(ms_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT,
|
||||||
@ -520,11 +520,11 @@ void QQnxIntegration::createDisplays()
|
|||||||
Q_SCREEN_CHECKERROR(result, "Failed to query display attachment");
|
Q_SCREEN_CHECKERROR(result, "Failed to query display attachment");
|
||||||
|
|
||||||
if (!isAttached) {
|
if (!isAttached) {
|
||||||
qIntegrationDebug() << Q_FUNC_INFO << "Skipping non-attached display" << i;
|
qIntegrationDebug() << "Skipping non-attached display" << i;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
qIntegrationDebug() << Q_FUNC_INFO << "Creating screen for display" << i;
|
qIntegrationDebug() << "Creating screen for display" << i;
|
||||||
createDisplay(displays[i], /*isPrimary=*/false);
|
createDisplay(displays[i], /*isPrimary=*/false);
|
||||||
} // of displays iteration
|
} // of displays iteration
|
||||||
}
|
}
|
||||||
@ -558,7 +558,7 @@ void QQnxIntegration::removeDisplay(QQnxScreen *screen)
|
|||||||
|
|
||||||
void QQnxIntegration::destroyDisplays()
|
void QQnxIntegration::destroyDisplays()
|
||||||
{
|
{
|
||||||
qIntegrationDebug() << Q_FUNC_INFO;
|
qIntegrationDebug();
|
||||||
Q_FOREACH (QQnxScreen *screen, m_screens) {
|
Q_FOREACH (QQnxScreen *screen, m_screens) {
|
||||||
QPlatformIntegration::destroyScreen(screen);
|
QPlatformIntegration::destroyScreen(screen);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ bool QQnxNavigatorBps::requestInvokeUrl(const QByteArray &encodedUrl)
|
|||||||
|
|
||||||
int ret = navigator_invoke(encodedUrl, &error);
|
int ret = navigator_invoke(encodedUrl, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
qWarning() << Q_FUNC_INFO << "error=" << error;
|
qWarning() << "error=" << error;
|
||||||
bps_free(error);
|
bps_free(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,20 +57,20 @@ bool QQnxNavigatorEventHandler::handleOrientationCheck(int angle)
|
|||||||
{
|
{
|
||||||
// reply to navigator that (any) orientation is acceptable
|
// reply to navigator that (any) orientation is acceptable
|
||||||
// TODO: check if top window flags prohibit orientation change
|
// TODO: check if top window flags prohibit orientation change
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << "angle=" << angle;
|
qNavigatorEventHandlerDebug() << "angle=" << angle;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxNavigatorEventHandler::handleOrientationChange(int angle)
|
void QQnxNavigatorEventHandler::handleOrientationChange(int angle)
|
||||||
{
|
{
|
||||||
// update screen geometry and reply to navigator that we're ready
|
// update screen geometry and reply to navigator that we're ready
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << "angle=" << angle;
|
qNavigatorEventHandlerDebug() << "angle=" << angle;
|
||||||
emit rotationChanged(angle);
|
emit rotationChanged(angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxNavigatorEventHandler::handleSwipeDown()
|
void QQnxNavigatorEventHandler::handleSwipeDown()
|
||||||
{
|
{
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO;
|
qNavigatorEventHandlerDebug();
|
||||||
|
|
||||||
Q_EMIT swipeDown();
|
Q_EMIT swipeDown();
|
||||||
}
|
}
|
||||||
@ -78,25 +78,25 @@ void QQnxNavigatorEventHandler::handleSwipeDown()
|
|||||||
void QQnxNavigatorEventHandler::handleExit()
|
void QQnxNavigatorEventHandler::handleExit()
|
||||||
{
|
{
|
||||||
// shutdown everything
|
// shutdown everything
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO;
|
qNavigatorEventHandlerDebug();
|
||||||
QCoreApplication::quit();
|
QCoreApplication::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxNavigatorEventHandler::handleWindowGroupActivated(const QByteArray &id)
|
void QQnxNavigatorEventHandler::handleWindowGroupActivated(const QByteArray &id)
|
||||||
{
|
{
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id;
|
qNavigatorEventHandlerDebug() << id;
|
||||||
Q_EMIT windowGroupActivated(id);
|
Q_EMIT windowGroupActivated(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxNavigatorEventHandler::handleWindowGroupDeactivated(const QByteArray &id)
|
void QQnxNavigatorEventHandler::handleWindowGroupDeactivated(const QByteArray &id)
|
||||||
{
|
{
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id;
|
qNavigatorEventHandlerDebug() << id;
|
||||||
Q_EMIT windowGroupDeactivated(id);
|
Q_EMIT windowGroupDeactivated(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxNavigatorEventHandler::handleWindowGroupStateChanged(const QByteArray &id, Qt::WindowState state)
|
void QQnxNavigatorEventHandler::handleWindowGroupStateChanged(const QByteArray &id, Qt::WindowState state)
|
||||||
{
|
{
|
||||||
qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id;
|
qNavigatorEventHandlerDebug() << id;
|
||||||
Q_EMIT windowGroupStateChanged(id, state);
|
Q_EMIT windowGroupStateChanged(id, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,18 +74,18 @@ QQnxNavigatorEventNotifier::~QQnxNavigatorEventNotifier()
|
|||||||
if (m_fd != -1)
|
if (m_fd != -1)
|
||||||
close(m_fd);
|
close(m_fd);
|
||||||
|
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "navigator event notifier stopped";
|
qNavigatorEventNotifierDebug("navigator event notifier stopped");
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxNavigatorEventNotifier::start()
|
void QQnxNavigatorEventNotifier::start()
|
||||||
{
|
{
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "navigator event notifier started";
|
qNavigatorEventNotifierDebug("navigator event notifier started");
|
||||||
|
|
||||||
// open connection to navigator
|
// open connection to navigator
|
||||||
errno = 0;
|
errno = 0;
|
||||||
m_fd = open(navigatorControlPath, O_RDWR);
|
m_fd = open(navigatorControlPath, O_RDWR);
|
||||||
if (m_fd == -1) {
|
if (m_fd == -1) {
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << ": failed to open navigator pps:"
|
qNavigatorEventNotifierDebug() << "failed to open navigator pps:"
|
||||||
<< strerror(errno);
|
<< strerror(errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ void QQnxNavigatorEventNotifier::start()
|
|||||||
|
|
||||||
void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray &msg, QByteArray &dat, QByteArray &id)
|
void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray &msg, QByteArray &dat, QByteArray &id)
|
||||||
{
|
{
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "data=" << ppsData;
|
qNavigatorEventNotifierDebug() << "data=" << ppsData;
|
||||||
|
|
||||||
// tokenize pps data into lines
|
// tokenize pps data into lines
|
||||||
QList<QByteArray> lines = ppsData.split('\n');
|
QList<QByteArray> lines = ppsData.split('\n');
|
||||||
@ -110,7 +110,7 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray
|
|||||||
|
|
||||||
// tokenize current attribute
|
// tokenize current attribute
|
||||||
const QByteArray &attr = lines.at(i);
|
const QByteArray &attr = lines.at(i);
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "attr=" << attr;
|
qNavigatorEventNotifierDebug() << "attr=" << attr;
|
||||||
|
|
||||||
int firstColon = attr.indexOf(':');
|
int firstColon = attr.indexOf(':');
|
||||||
if (firstColon == -1) {
|
if (firstColon == -1) {
|
||||||
@ -127,8 +127,8 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray
|
|||||||
QByteArray key = attr.left(firstColon);
|
QByteArray key = attr.left(firstColon);
|
||||||
QByteArray value = attr.mid(secondColon + 1);
|
QByteArray value = attr.mid(secondColon + 1);
|
||||||
|
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "key=" << key;
|
qNavigatorEventNotifierDebug() << "key=" << key;
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "val=" << value;
|
qNavigatorEventNotifierDebug() << "val=" << value;
|
||||||
|
|
||||||
// save attribute value
|
// save attribute value
|
||||||
if (key == "msg")
|
if (key == "msg")
|
||||||
@ -155,7 +155,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra
|
|||||||
}
|
}
|
||||||
ppsData += "\n";
|
ppsData += "\n";
|
||||||
|
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "reply=" << ppsData;
|
qNavigatorEventNotifierDebug() << "reply=" << ppsData;
|
||||||
|
|
||||||
// send pps message to navigator
|
// send pps message to navigator
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@ -166,7 +166,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra
|
|||||||
|
|
||||||
void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByteArray &dat, const QByteArray &id)
|
void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByteArray &dat, const QByteArray &id)
|
||||||
{
|
{
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "msg=" << msg << ", dat=" << dat << ", id=" << id;
|
qNavigatorEventNotifierDebug() << "msg=" << msg << ", dat=" << dat << ", id=" << id;
|
||||||
|
|
||||||
// check message type
|
// check message type
|
||||||
if (msg == "orientationCheck") {
|
if (msg == "orientationCheck") {
|
||||||
@ -190,7 +190,7 @@ void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByt
|
|||||||
|
|
||||||
void QQnxNavigatorEventNotifier::readData()
|
void QQnxNavigatorEventNotifier::readData()
|
||||||
{
|
{
|
||||||
qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "reading navigator data";
|
qNavigatorEventNotifierDebug("reading navigator data");
|
||||||
|
|
||||||
// allocate buffer for pps data
|
// allocate buffer for pps data
|
||||||
char buffer[ppsBufferSize];
|
char buffer[ppsBufferSize];
|
||||||
|
@ -73,7 +73,7 @@ bool QQnxNavigatorPps::openPpsConnection()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "successfully connected to Navigator. fd=" << m_fd;
|
qNavigatorDebug() << "successfully connected to Navigator. fd=" << m_fd;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra
|
|||||||
|
|
||||||
ppsMessage += "\n";
|
ppsMessage += "\n";
|
||||||
|
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "sending PPS message:\n" << ppsMessage;
|
qNavigatorDebug() << "sending PPS message:\n" << ppsMessage;
|
||||||
|
|
||||||
// send pps message to navigator
|
// send pps message to navigator
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@ -117,7 +117,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra
|
|||||||
// ensure data is null terminated
|
// ensure data is null terminated
|
||||||
buffer[bytes] = '\0';
|
buffer[bytes] = '\0';
|
||||||
|
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "received PPS message:\n" << buffer;
|
qNavigatorDebug() << "received PPS message:\n" << buffer;
|
||||||
|
|
||||||
// process received message
|
// process received message
|
||||||
QByteArray ppsData(buffer);
|
QByteArray ppsData(buffer);
|
||||||
@ -136,7 +136,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra
|
|||||||
|
|
||||||
void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QByteArray> &messageFields)
|
void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QByteArray> &messageFields)
|
||||||
{
|
{
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "data=" << ppsData;
|
qNavigatorDebug() << "data=" << ppsData;
|
||||||
|
|
||||||
// tokenize pps data into lines
|
// tokenize pps data into lines
|
||||||
QList<QByteArray> lines = ppsData.split('\n');
|
QList<QByteArray> lines = ppsData.split('\n');
|
||||||
@ -151,7 +151,7 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QBy
|
|||||||
// tokenize current attribute
|
// tokenize current attribute
|
||||||
const QByteArray &attr = lines.at(i);
|
const QByteArray &attr = lines.at(i);
|
||||||
|
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "attr=" << attr;
|
qNavigatorDebug() << "attr=" << attr;
|
||||||
|
|
||||||
int firstColon = attr.indexOf(':');
|
int firstColon = attr.indexOf(':');
|
||||||
if (firstColon == -1) {
|
if (firstColon == -1) {
|
||||||
@ -168,8 +168,8 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QBy
|
|||||||
QByteArray key = attr.left(firstColon);
|
QByteArray key = attr.left(firstColon);
|
||||||
QByteArray value = attr.mid(secondColon + 1);
|
QByteArray value = attr.mid(secondColon + 1);
|
||||||
|
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "key=" << key;
|
qNavigatorDebug() << "key=" << key;
|
||||||
qNavigatorDebug() << Q_FUNC_INFO << "val=" << value;
|
qNavigatorDebug() << "val=" << value;
|
||||||
messageFields[key] = value;
|
messageFields[key] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,14 +53,14 @@ QQnxRasterBackingStore::QQnxRasterBackingStore(QWindow *window)
|
|||||||
m_needsPosting(false),
|
m_needsPosting(false),
|
||||||
m_scrolled(false)
|
m_scrolled(false)
|
||||||
{
|
{
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window;
|
qRasterBackingStoreDebug() << "w =" << window;
|
||||||
|
|
||||||
m_window = window;
|
m_window = window;
|
||||||
}
|
}
|
||||||
|
|
||||||
QQnxRasterBackingStore::~QQnxRasterBackingStore()
|
QQnxRasterBackingStore::~QQnxRasterBackingStore()
|
||||||
{
|
{
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
qRasterBackingStoreDebug() << "w =" << window();
|
||||||
}
|
}
|
||||||
|
|
||||||
QPaintDevice *QQnxRasterBackingStore::paintDevice()
|
QPaintDevice *QQnxRasterBackingStore::paintDevice()
|
||||||
@ -75,7 +75,7 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const
|
|||||||
{
|
{
|
||||||
Q_UNUSED(offset)
|
Q_UNUSED(offset)
|
||||||
|
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << this->window();
|
qRasterBackingStoreDebug() << "w =" << this->window();
|
||||||
|
|
||||||
// Sometimes this method is called even though there is nothing to be
|
// Sometimes this method is called even though there is nothing to be
|
||||||
// flushed (posted in "screen" parlance), for instance, after an expose
|
// flushed (posted in "screen" parlance), for instance, after an expose
|
||||||
@ -103,7 +103,7 @@ void QQnxRasterBackingStore::resize(const QSize &size, const QRegion &staticCont
|
|||||||
{
|
{
|
||||||
Q_UNUSED(size);
|
Q_UNUSED(size);
|
||||||
Q_UNUSED(staticContents);
|
Q_UNUSED(staticContents);
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window() << ", s =" << size;
|
qRasterBackingStoreDebug() << "w =" << window() << ", s =" << size;
|
||||||
|
|
||||||
// NOTE: defer resizing window buffers until next paint as
|
// NOTE: defer resizing window buffers until next paint as
|
||||||
// resize() can be called multiple times before a paint occurs
|
// resize() can be called multiple times before a paint occurs
|
||||||
@ -111,7 +111,7 @@ void QQnxRasterBackingStore::resize(const QSize &size, const QRegion &staticCont
|
|||||||
|
|
||||||
bool QQnxRasterBackingStore::scroll(const QRegion &area, int dx, int dy)
|
bool QQnxRasterBackingStore::scroll(const QRegion &area, int dx, int dy)
|
||||||
{
|
{
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
qRasterBackingStoreDebug() << "w =" << window();
|
||||||
|
|
||||||
m_needsPosting = true;
|
m_needsPosting = true;
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion ®ion)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(region);
|
Q_UNUSED(region);
|
||||||
|
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
qRasterBackingStoreDebug() << "w =" << window();
|
||||||
m_needsPosting = true;
|
m_needsPosting = true;
|
||||||
|
|
||||||
platformWindow()->adjustBufferSize();
|
platformWindow()->adjustBufferSize();
|
||||||
@ -154,7 +154,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion ®ion)
|
|||||||
|
|
||||||
void QQnxRasterBackingStore::endPaint()
|
void QQnxRasterBackingStore::endPaint()
|
||||||
{
|
{
|
||||||
qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window();
|
qRasterBackingStoreDebug() << "w =" << window();
|
||||||
}
|
}
|
||||||
|
|
||||||
QQnxRasterWindow *QQnxRasterBackingStore::platformWindow() const
|
QQnxRasterWindow *QQnxRasterBackingStore::platformWindow() const
|
||||||
|
@ -91,7 +91,7 @@ void QQnxRasterWindow::post(const QRegion &dirty)
|
|||||||
|
|
||||||
// Check if render buffer exists and something was rendered
|
// Check if render buffer exists and something was rendered
|
||||||
if (m_currentBufferIndex != -1 && !dirty.isEmpty()) {
|
if (m_currentBufferIndex != -1 && !dirty.isEmpty()) {
|
||||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qRasterWindowDebug() << "window =" << window();
|
||||||
QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
|
QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
|
||||||
|
|
||||||
// Copy unmodified region from old render buffer to new render buffer;
|
// Copy unmodified region from old render buffer to new render buffer;
|
||||||
@ -124,14 +124,14 @@ void QQnxRasterWindow::post(const QRegion &dirty)
|
|||||||
|
|
||||||
void QQnxRasterWindow::scroll(const QRegion ®ion, int dx, int dy, bool flush)
|
void QQnxRasterWindow::scroll(const QRegion ®ion, int dx, int dy, bool flush)
|
||||||
{
|
{
|
||||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qRasterWindowDebug() << "window =" << window();
|
||||||
blitPreviousToCurrent(region, dx, dy, flush);
|
blitPreviousToCurrent(region, dx, dy, flush);
|
||||||
m_scrolled += region;
|
m_scrolled += region;
|
||||||
}
|
}
|
||||||
|
|
||||||
QQnxBuffer &QQnxRasterWindow::renderBuffer()
|
QQnxBuffer &QQnxRasterWindow::renderBuffer()
|
||||||
{
|
{
|
||||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qRasterWindowDebug() << "window =" << window();
|
||||||
|
|
||||||
// Check if render buffer is invalid
|
// Check if render buffer is invalid
|
||||||
if (m_currentBufferIndex == -1) {
|
if (m_currentBufferIndex == -1) {
|
||||||
@ -192,7 +192,7 @@ void QQnxRasterWindow::resetBuffers()
|
|||||||
|
|
||||||
void QQnxRasterWindow::blitPreviousToCurrent(const QRegion ®ion, int dx, int dy, bool flush)
|
void QQnxRasterWindow::blitPreviousToCurrent(const QRegion ®ion, int dx, int dy, bool flush)
|
||||||
{
|
{
|
||||||
qRasterWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qRasterWindowDebug() << "window =" << window();
|
||||||
|
|
||||||
// Abort if previous buffer is invalid or if nothing to copy
|
// Abort if previous buffer is invalid or if nothing to copy
|
||||||
if (m_previousBufferIndex == -1 || region.isEmpty())
|
if (m_previousBufferIndex == -1 || region.isEmpty())
|
||||||
|
@ -154,7 +154,7 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
|
|||||||
m_coverWindow(0),
|
m_coverWindow(0),
|
||||||
m_cursor(new QQnxCursor())
|
m_cursor(new QQnxCursor())
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
// Cache initial orientation of this display
|
// Cache initial orientation of this display
|
||||||
int result = screen_get_display_property_iv(m_display, SCREEN_PROPERTY_ROTATION,
|
int result = screen_get_display_property_iv(m_display, SCREEN_PROPERTY_ROTATION,
|
||||||
&m_initialRotation);
|
&m_initialRotation);
|
||||||
@ -191,7 +191,7 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
|
|||||||
|
|
||||||
QQnxScreen::~QQnxScreen()
|
QQnxScreen::~QQnxScreen()
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
Q_FOREACH (QQnxWindow *childWindow, m_childWindows)
|
Q_FOREACH (QQnxWindow *childWindow, m_childWindows)
|
||||||
childWindow->setScreen(0);
|
childWindow->setScreen(0);
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ QPixmap QQnxScreen::grabWindow(WId window, int x, int y, int width, int height)
|
|||||||
|
|
||||||
static int defaultDepth()
|
static int defaultDepth()
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
static int defaultDepth = 0;
|
static int defaultDepth = 0;
|
||||||
if (defaultDepth == 0) {
|
if (defaultDepth == 0) {
|
||||||
// check if display depth was specified in environment variable;
|
// check if display depth was specified in environment variable;
|
||||||
@ -314,7 +314,7 @@ static int defaultDepth()
|
|||||||
|
|
||||||
QRect QQnxScreen::availableGeometry() const
|
QRect QQnxScreen::availableGeometry() const
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
// available geometry = total geometry - keyboard
|
// available geometry = total geometry - keyboard
|
||||||
return QRect(m_currentGeometry.x(), m_currentGeometry.y(),
|
return QRect(m_currentGeometry.x(), m_currentGeometry.y(),
|
||||||
m_currentGeometry.width(), m_currentGeometry.height() - m_keyboardHeight);
|
m_currentGeometry.width(), m_currentGeometry.height() - m_keyboardHeight);
|
||||||
@ -334,7 +334,7 @@ qreal QQnxScreen::refreshRate() const
|
|||||||
qWarning("QQnxScreen: Failed to query screen mode. Using default value of 60Hz");
|
qWarning("QQnxScreen: Failed to query screen mode. Using default value of 60Hz");
|
||||||
return 60.0;
|
return 60.0;
|
||||||
}
|
}
|
||||||
qScreenDebug() << Q_FUNC_INFO << "screen mode:" << endl
|
qScreenDebug() << "screen mode:" << endl
|
||||||
<< " width =" << displayMode.width << endl
|
<< " width =" << displayMode.width << endl
|
||||||
<< " height =" << displayMode.height << endl
|
<< " height =" << displayMode.height << endl
|
||||||
<< " refresh =" << displayMode.refresh << endl
|
<< " refresh =" << displayMode.refresh << endl
|
||||||
@ -372,7 +372,7 @@ Qt::ScreenOrientation QQnxScreen::orientation() const
|
|||||||
else
|
else
|
||||||
orient = Qt::InvertedLandscapeOrientation;
|
orient = Qt::InvertedLandscapeOrientation;
|
||||||
}
|
}
|
||||||
qScreenDebug() << Q_FUNC_INFO << "orientation =" << orient;
|
qScreenDebug() << "orientation =" << orient;
|
||||||
return orient;
|
return orient;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ static bool isOrthogonal(int angle1, int angle2)
|
|||||||
|
|
||||||
void QQnxScreen::setRotation(int rotation)
|
void QQnxScreen::setRotation(int rotation)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO << "orientation =" << rotation;
|
qScreenDebug() << "orientation =" << rotation;
|
||||||
// Check if rotation changed
|
// Check if rotation changed
|
||||||
// We only want to rotate if we are the primary screen
|
// We only want to rotate if we are the primary screen
|
||||||
if (m_currentRotation != rotation && isPrimaryScreen()) {
|
if (m_currentRotation != rotation && isPrimaryScreen()) {
|
||||||
@ -419,7 +419,7 @@ void QQnxScreen::setRotation(int rotation)
|
|||||||
|
|
||||||
// Resize root window if we've rotated 90 or 270 from previous orientation
|
// Resize root window if we've rotated 90 or 270 from previous orientation
|
||||||
if (isOrthogonal(m_currentRotation, rotation)) {
|
if (isOrthogonal(m_currentRotation, rotation)) {
|
||||||
qScreenDebug() << Q_FUNC_INFO << "resize, size =" << m_currentGeometry.size();
|
qScreenDebug() << "resize, size =" << m_currentGeometry.size();
|
||||||
if (rootWindow())
|
if (rootWindow())
|
||||||
rootWindow()->setGeometry(QRect(QPoint(0,0), m_currentGeometry.size()));
|
rootWindow()->setGeometry(QRect(QPoint(0,0), m_currentGeometry.size()));
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ QQnxWindow *QQnxScreen::findWindow(screen_window_t windowHandle) const
|
|||||||
|
|
||||||
void QQnxScreen::addWindow(QQnxWindow *window)
|
void QQnxScreen::addWindow(QQnxWindow *window)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
qScreenDebug() << "window =" << window;
|
||||||
|
|
||||||
if (m_childWindows.contains(window))
|
if (m_childWindows.contains(window))
|
||||||
return;
|
return;
|
||||||
@ -593,7 +593,7 @@ void QQnxScreen::addWindow(QQnxWindow *window)
|
|||||||
|
|
||||||
void QQnxScreen::removeWindow(QQnxWindow *window)
|
void QQnxScreen::removeWindow(QQnxWindow *window)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
qScreenDebug() << "window =" << window;
|
||||||
|
|
||||||
if (window != m_coverWindow) {
|
if (window != m_coverWindow) {
|
||||||
const int numWindowsRemoved = m_childWindows.removeAll(window);
|
const int numWindowsRemoved = m_childWindows.removeAll(window);
|
||||||
@ -608,7 +608,7 @@ void QQnxScreen::removeWindow(QQnxWindow *window)
|
|||||||
|
|
||||||
void QQnxScreen::raiseWindow(QQnxWindow *window)
|
void QQnxScreen::raiseWindow(QQnxWindow *window)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
qScreenDebug() << "window =" << window;
|
||||||
|
|
||||||
if (window != m_coverWindow) {
|
if (window != m_coverWindow) {
|
||||||
removeWindow(window);
|
removeWindow(window);
|
||||||
@ -618,7 +618,7 @@ void QQnxScreen::raiseWindow(QQnxWindow *window)
|
|||||||
|
|
||||||
void QQnxScreen::lowerWindow(QQnxWindow *window)
|
void QQnxScreen::lowerWindow(QQnxWindow *window)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO << "window =" << window;
|
qScreenDebug() << "window =" << window;
|
||||||
|
|
||||||
if (window != m_coverWindow) {
|
if (window != m_coverWindow) {
|
||||||
removeWindow(window);
|
removeWindow(window);
|
||||||
@ -628,7 +628,7 @@ void QQnxScreen::lowerWindow(QQnxWindow *window)
|
|||||||
|
|
||||||
void QQnxScreen::updateHierarchy()
|
void QQnxScreen::updateHierarchy()
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
|
|
||||||
QList<QQnxWindow*>::const_iterator it;
|
QList<QQnxWindow*>::const_iterator it;
|
||||||
int result;
|
int result;
|
||||||
@ -804,7 +804,7 @@ void QQnxScreen::windowClosed(void *window)
|
|||||||
|
|
||||||
void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState state)
|
void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState state)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
|
|
||||||
if (!rootWindow() || id != rootWindow()->groupName())
|
if (!rootWindow() || id != rootWindow()->groupName())
|
||||||
return;
|
return;
|
||||||
@ -819,7 +819,7 @@ void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState s
|
|||||||
|
|
||||||
void QQnxScreen::activateWindowGroup(const QByteArray &id)
|
void QQnxScreen::activateWindowGroup(const QByteArray &id)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
|
|
||||||
if (!rootWindow() || id != rootWindow()->groupName())
|
if (!rootWindow() || id != rootWindow()->groupName())
|
||||||
return;
|
return;
|
||||||
@ -838,7 +838,7 @@ void QQnxScreen::activateWindowGroup(const QByteArray &id)
|
|||||||
|
|
||||||
void QQnxScreen::deactivateWindowGroup(const QByteArray &id)
|
void QQnxScreen::deactivateWindowGroup(const QByteArray &id)
|
||||||
{
|
{
|
||||||
qScreenDebug() << Q_FUNC_INFO;
|
qScreenDebug();
|
||||||
|
|
||||||
if (!rootWindow() || id != rootWindow()->groupName())
|
if (!rootWindow() || id != rootWindow()->groupName())
|
||||||
return;
|
return;
|
||||||
|
@ -141,7 +141,7 @@ bool QQnxScreenEventHandler::handleEvent(screen_event_t event, int qnxType)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
// event ignored
|
// event ignored
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "unknown event" << qnxType;
|
qScreenEventDebug() << "unknown event" << qnxType;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
|
|||||||
|
|
||||||
QWindowSystemInterface::handleExtendedKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod,
|
QWindowSystemInterface::handleExtendedKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod,
|
||||||
scan, sym, modifiers, keyStr);
|
scan, sym, modifiers, keyStr);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt key t=" << type << ", k=" << key << ", s=" << keyStr;
|
qScreenEventDebug() << "Qt key t=" << type << ", k=" << key << ", s=" << keyStr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,12 +315,12 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
|
|||||||
|
|
||||||
if (wOld) {
|
if (wOld) {
|
||||||
QWindowSystemInterface::handleLeaveEvent(wOld);
|
QWindowSystemInterface::handleLeaveEvent(wOld);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt leave, w=" << wOld;
|
qScreenEventDebug() << "Qt leave, w=" << wOld;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w) {
|
if (w) {
|
||||||
QWindowSystemInterface::handleEnterEvent(w);
|
QWindowSystemInterface::handleEnterEvent(w);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt enter, w=" << w;
|
qScreenEventDebug() << "Qt enter, w=" << w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,14 +363,14 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
|
|||||||
m_lastLocalMousePoint != localPoint ||
|
m_lastLocalMousePoint != localPoint ||
|
||||||
m_lastButtonState != buttons) {
|
m_lastButtonState != buttons) {
|
||||||
QWindowSystemInterface::handleMouseEvent(w, localPoint, globalPoint, buttons);
|
QWindowSystemInterface::handleMouseEvent(w, localPoint, globalPoint, buttons);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt mouse, w=" << w << ", (" << localPoint.x() << "," << localPoint.y() << "), b=" << static_cast<int>(buttons);
|
qScreenEventDebug() << "Qt mouse, w=" << w << ", (" << localPoint.x() << "," << localPoint.y() << "), b=" << static_cast<int>(buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wheelDelta) {
|
if (wheelDelta) {
|
||||||
// Screen only supports a single wheel, so we will assume Vertical orientation for
|
// Screen only supports a single wheel, so we will assume Vertical orientation for
|
||||||
// now since that is pretty much standard.
|
// now since that is pretty much standard.
|
||||||
QWindowSystemInterface::handleWheelEvent(w, localPoint, globalPoint, wheelDelta, Qt::Vertical);
|
QWindowSystemInterface::handleWheelEvent(w, localPoint, globalPoint, wheelDelta, Qt::Vertical);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt wheel, w=" << w << ", (" << localPoint.x() << "," << localPoint.y() << "), d=" << static_cast<int>(wheelDelta);
|
qScreenEventDebug() << "Qt wheel, w=" << w << ", (" << localPoint.x() << "," << localPoint.y() << "), d=" << static_cast<int>(wheelDelta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,12 +427,12 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
|
|||||||
|
|
||||||
if (wOld) {
|
if (wOld) {
|
||||||
QWindowSystemInterface::handleLeaveEvent(wOld);
|
QWindowSystemInterface::handleLeaveEvent(wOld);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt leave, w=" << wOld;
|
qScreenEventDebug() << "Qt leave, w=" << wOld;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w) {
|
if (w) {
|
||||||
QWindowSystemInterface::handleEnterEvent(w);
|
QWindowSystemInterface::handleEnterEvent(w);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt enter, w=" << w;
|
qScreenEventDebug() << "Qt enter, w=" << w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_lastMouseWindow = qnxWindow;
|
m_lastMouseWindow = qnxWindow;
|
||||||
@ -496,7 +496,7 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
|
|||||||
|
|
||||||
// inject event into Qt
|
// inject event into Qt
|
||||||
QWindowSystemInterface::handleTouchEvent(w, m_touchDevice, pointList);
|
QWindowSystemInterface::handleTouchEvent(w, m_touchDevice, pointList);
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt touch, w =" << w
|
qScreenEventDebug() << "Qt touch, w =" << w
|
||||||
<< ", p=" << m_touchPoints[touchId].area.topLeft()
|
<< ", p=" << m_touchPoints[touchId].area.topLeft()
|
||||||
<< ", t=" << type;
|
<< ", t=" << type;
|
||||||
}
|
}
|
||||||
@ -542,7 +542,7 @@ void QQnxScreenEventHandler::handleDisplayEvent(screen_event_t event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "display attachment is now:" << isAttached;
|
qScreenEventDebug() << "display attachment is now:" << isAttached;
|
||||||
QQnxScreen *screen = m_qnxIntegration->screenForNative(nativeDisplay);
|
QQnxScreen *screen = m_qnxIntegration->screenForNative(nativeDisplay);
|
||||||
|
|
||||||
if (!screen) {
|
if (!screen) {
|
||||||
@ -598,7 +598,7 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// event ignored
|
// event ignored
|
||||||
qScreenEventDebug() << Q_FUNC_INFO << "Ignore property event for property: " << property;
|
qScreenEventDebug() << "Ignore property event for property: " << property;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void QQnxScreenEventThread::unlock()
|
|||||||
|
|
||||||
void QQnxScreenEventThread::run()
|
void QQnxScreenEventThread::run()
|
||||||
{
|
{
|
||||||
qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread started";
|
qScreenEventThreadDebug("screen event thread started");
|
||||||
|
|
||||||
int errorCounter = 0;
|
int errorCounter = 0;
|
||||||
// loop indefinitely
|
// loop indefinitely
|
||||||
@ -117,7 +117,7 @@ void QQnxScreenEventThread::run()
|
|||||||
|
|
||||||
if (qnxType == SCREEN_EVENT_USER) {
|
if (qnxType == SCREEN_EVENT_USER) {
|
||||||
// treat all user events as shutdown requests
|
// treat all user events as shutdown requests
|
||||||
qScreenEventThreadDebug() << Q_FUNC_INFO << "QNX user screen event";
|
qScreenEventThreadDebug("QNX user screen event");
|
||||||
m_quit = true;
|
m_quit = true;
|
||||||
} else {
|
} else {
|
||||||
m_mutex.lock();
|
m_mutex.lock();
|
||||||
@ -127,7 +127,7 @@ void QQnxScreenEventThread::run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread stopped";
|
qScreenEventThreadDebug("screen event thread stopped");
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
m_mutex.lock();
|
m_mutex.lock();
|
||||||
@ -160,10 +160,10 @@ void QQnxScreenEventThread::shutdown()
|
|||||||
// cleanup
|
// cleanup
|
||||||
screen_destroy_event(event);
|
screen_destroy_event(event);
|
||||||
|
|
||||||
qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread shutdown begin";
|
qScreenEventThreadDebug("screen event thread shutdown begin");
|
||||||
|
|
||||||
// block until thread terminates
|
// block until thread terminates
|
||||||
wait();
|
wait();
|
||||||
|
|
||||||
qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread shutdown end";
|
qScreenEventThreadDebug("screen event thread shutdown end");
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ bool QQnxVirtualKeyboardBps::handleEvent(bps_event_t *event)
|
|||||||
|
|
||||||
bool QQnxVirtualKeyboardBps::showKeyboard()
|
bool QQnxVirtualKeyboardBps::showKeyboard()
|
||||||
{
|
{
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "current visibility=" << isVisible();
|
qVirtualKeyboardDebug() << "current visibility=" << isVisible();
|
||||||
|
|
||||||
// They keyboard's mode is global between applications, we have to set it each time
|
// They keyboard's mode is global between applications, we have to set it each time
|
||||||
if ( !isVisible() )
|
if ( !isVisible() )
|
||||||
@ -92,7 +92,7 @@ bool QQnxVirtualKeyboardBps::showKeyboard()
|
|||||||
|
|
||||||
bool QQnxVirtualKeyboardBps::hideKeyboard()
|
bool QQnxVirtualKeyboardBps::hideKeyboard()
|
||||||
{
|
{
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "current visibility=" << isVisible();
|
qVirtualKeyboardDebug() << "current visibility=" << isVisible();
|
||||||
virtualkeyboard_hide();
|
virtualkeyboard_hide();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ void QQnxVirtualKeyboardBps::applyKeyboardOptions()
|
|||||||
virtualkeyboard_layout_t layout = keyboardLayout();
|
virtualkeyboard_layout_t layout = keyboardLayout();
|
||||||
virtualkeyboard_enter_t enter = enterKey();
|
virtualkeyboard_enter_t enter = enterKey();
|
||||||
|
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "mode=" << keyboardMode() << "enterKey=" << enterKeyType();
|
qVirtualKeyboardDebug() << "mode=" << keyboardMode() << "enterKey=" << enterKeyType();
|
||||||
|
|
||||||
virtualkeyboard_change_options(layout, enter);
|
virtualkeyboard_change_options(layout, enter);
|
||||||
}
|
}
|
||||||
@ -176,12 +176,12 @@ bool QQnxVirtualKeyboardBps::handleLocaleEvent(bps_event_t *event)
|
|||||||
const QString country = QString::fromLatin1(locale_event_get_country(event));
|
const QString country = QString::fromLatin1(locale_event_get_country(event));
|
||||||
const QLocale newLocale(language + QLatin1Char('_') + country);
|
const QLocale newLocale(language + QLatin1Char('_') + country);
|
||||||
|
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "current locale" << locale() << "new locale=" << newLocale;
|
qVirtualKeyboardDebug() << "current locale" << locale() << "new locale=" << newLocale;
|
||||||
setLocale(newLocale);
|
setLocale(newLocale);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled locale event. code=" << bps_event_get_code(event);
|
qVirtualKeyboardDebug() << "Unhandled locale event. code=" << bps_event_get_code(event);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -190,24 +190,24 @@ bool QQnxVirtualKeyboardBps::handleVirtualKeyboardEvent(bps_event_t *event)
|
|||||||
{
|
{
|
||||||
switch (bps_event_get_code(event)) {
|
switch (bps_event_get_code(event)) {
|
||||||
case VIRTUALKEYBOARD_EVENT_VISIBLE:
|
case VIRTUALKEYBOARD_EVENT_VISIBLE:
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "EVENT VISIBLE: current visibility=" << isVisible();
|
qVirtualKeyboardDebug() << "EVENT VISIBLE: current visibility=" << isVisible();
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIRTUALKEYBOARD_EVENT_HIDDEN:
|
case VIRTUALKEYBOARD_EVENT_HIDDEN:
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "EVENT HIDDEN: current visibility=" << isVisible();
|
qVirtualKeyboardDebug() << "EVENT HIDDEN: current visibility=" << isVisible();
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIRTUALKEYBOARD_EVENT_INFO: {
|
case VIRTUALKEYBOARD_EVENT_INFO: {
|
||||||
const int newHeight = virtualkeyboard_event_get_height(event);
|
const int newHeight = virtualkeyboard_event_get_height(event);
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "EVENT INFO: current height=" << height() << "new height=" << newHeight;
|
qVirtualKeyboardDebug() << "EVENT INFO: current height=" << height() << "new height=" << newHeight;
|
||||||
setHeight(newHeight);
|
setHeight(newHeight);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled virtual keyboard event. code=" << bps_event_get_code(event);
|
qVirtualKeyboardDebug() << "Unhandled virtual keyboard event. code=" << bps_event_get_code(event);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ QQnxVirtualKeyboardPps::~QQnxVirtualKeyboardPps()
|
|||||||
|
|
||||||
void QQnxVirtualKeyboardPps::start()
|
void QQnxVirtualKeyboardPps::start()
|
||||||
{
|
{
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "starting keyboard event processing";
|
qVirtualKeyboardDebug("starting keyboard event processing");
|
||||||
if (!connect())
|
if (!connect())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ bool QQnxVirtualKeyboardPps::connect()
|
|||||||
m_fd = ::open(ms_PPSPath, O_RDWR);
|
m_fd = ::open(ms_PPSPath, O_RDWR);
|
||||||
if (m_fd == -1)
|
if (m_fd == -1)
|
||||||
{
|
{
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << ": Unable to open" << ms_PPSPath
|
qVirtualKeyboardDebug() << "Unable to open" << ms_PPSPath
|
||||||
<< ':' << strerror(errno);
|
<< ':' << strerror(errno);
|
||||||
close();
|
close();
|
||||||
return false;
|
return false;
|
||||||
@ -158,7 +158,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady()
|
|||||||
{
|
{
|
||||||
ssize_t nread = qt_safe_read(m_fd, m_buffer, ms_bufferSize - 1);
|
ssize_t nread = qt_safe_read(m_fd, m_buffer, ms_bufferSize - 1);
|
||||||
|
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "keyboardMessage size: " << nread;
|
qVirtualKeyboardDebug() << "keyboardMessage size: " << nread;
|
||||||
if (nread < 0){
|
if (nread < 0){
|
||||||
connect(); // reconnect
|
connect(); // reconnect
|
||||||
return;
|
return;
|
||||||
@ -197,7 +197,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady()
|
|||||||
else if (strcmp(value, "info") == 0)
|
else if (strcmp(value, "info") == 0)
|
||||||
handleKeyboardInfoMessage();
|
handleKeyboardInfoMessage();
|
||||||
else if (strcmp(value, "connect") == 0)
|
else if (strcmp(value, "connect") == 0)
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled command 'connect'";
|
qVirtualKeyboardDebug("Unhandled command 'connect'");
|
||||||
else
|
else
|
||||||
qCritical("QQnxVirtualKeyboard: Unexpected keyboard PPS msg value: %s", value ? value : "[null]");
|
qCritical("QQnxVirtualKeyboard: Unexpected keyboard PPS msg value: %s", value ? value : "[null]");
|
||||||
} else if (pps_decoder_get_string(m_decoder, "res", &value) == PPS_DECODER_OK) {
|
} else if (pps_decoder_get_string(m_decoder, "res", &value) == PPS_DECODER_OK) {
|
||||||
@ -224,12 +224,12 @@ void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage()
|
|||||||
}
|
}
|
||||||
setHeight(newHeight);
|
setHeight(newHeight);
|
||||||
|
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << "size=" << newHeight;
|
qVirtualKeyboardDebug() << "size=" << newHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QQnxVirtualKeyboardPps::showKeyboard()
|
bool QQnxVirtualKeyboardPps::showKeyboard()
|
||||||
{
|
{
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO;
|
qVirtualKeyboardDebug();
|
||||||
|
|
||||||
if (!prepareToSend())
|
if (!prepareToSend())
|
||||||
return false;
|
return false;
|
||||||
@ -251,7 +251,7 @@ bool QQnxVirtualKeyboardPps::showKeyboard()
|
|||||||
|
|
||||||
bool QQnxVirtualKeyboardPps::hideKeyboard()
|
bool QQnxVirtualKeyboardPps::hideKeyboard()
|
||||||
{
|
{
|
||||||
qVirtualKeyboardDebug() << Q_FUNC_INFO;
|
qVirtualKeyboardDebug();
|
||||||
|
|
||||||
if (!prepareToSend())
|
if (!prepareToSend())
|
||||||
return false;
|
return false;
|
||||||
|
@ -156,7 +156,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
|
|||||||
m_windowState(Qt::WindowNoState),
|
m_windowState(Qt::WindowNoState),
|
||||||
m_mmRendererWindow(0)
|
m_mmRendererWindow(0)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window << ", size =" << window->size();
|
qWindowDebug() << "window =" << window << ", size =" << window->size();
|
||||||
|
|
||||||
QQnxScreen *platformScreen = static_cast<QQnxScreen *>(window->screen()->handle());
|
QQnxScreen *platformScreen = static_cast<QQnxScreen *>(window->screen()->handle());
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
|
|||||||
|
|
||||||
QQnxWindow::~QQnxWindow()
|
QQnxWindow::~QQnxWindow()
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qWindowDebug() << "window =" << window();
|
||||||
|
|
||||||
// Qt should have already deleted the children before deleting the parent.
|
// Qt should have already deleted the children before deleting the parent.
|
||||||
Q_ASSERT(m_childWindows.size() == 0);
|
Q_ASSERT(m_childWindows.size() == 0);
|
||||||
@ -247,7 +247,7 @@ void QQnxWindow::setGeometry(const QRect &rect)
|
|||||||
|
|
||||||
void QQnxWindow::setGeometryHelper(const QRect &rect)
|
void QQnxWindow::setGeometryHelper(const QRect &rect)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window()
|
qWindowDebug() << "window =" << window()
|
||||||
<< ", (" << rect.x() << "," << rect.y()
|
<< ", (" << rect.x() << "," << rect.y()
|
||||||
<< "," << rect.width() << "," << rect.height() << ")";
|
<< "," << rect.width() << "," << rect.height() << ")";
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ void QQnxWindow::setGeometryHelper(const QRect &rect)
|
|||||||
|
|
||||||
void QQnxWindow::setVisible(bool visible)
|
void QQnxWindow::setVisible(bool visible)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "visible =" << visible;
|
qWindowDebug() << "window =" << window() << "visible =" << visible;
|
||||||
|
|
||||||
if (m_visible == visible || window()->type() == Qt::Desktop)
|
if (m_visible == visible || window()->type() == Qt::Desktop)
|
||||||
return;
|
return;
|
||||||
@ -308,7 +308,7 @@ void QQnxWindow::setVisible(bool visible)
|
|||||||
|
|
||||||
void QQnxWindow::updateVisibility(bool parentVisible)
|
void QQnxWindow::updateVisibility(bool parentVisible)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "parentVisible =" << parentVisible << "window =" << window();
|
qWindowDebug() << "parentVisible =" << parentVisible << "window =" << window();
|
||||||
// Set window visibility
|
// Set window visibility
|
||||||
int val = (m_visible && parentVisible) ? 1 : 0;
|
int val = (m_visible && parentVisible) ? 1 : 0;
|
||||||
Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &val),
|
Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &val),
|
||||||
@ -320,7 +320,7 @@ void QQnxWindow::updateVisibility(bool parentVisible)
|
|||||||
|
|
||||||
void QQnxWindow::setOpacity(qreal level)
|
void QQnxWindow::setOpacity(qreal level)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "opacity =" << level;
|
qWindowDebug() << "window =" << window() << "opacity =" << level;
|
||||||
// Set window global alpha
|
// Set window global alpha
|
||||||
int val = (int)(level * 255);
|
int val = (int)(level * 255);
|
||||||
Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_GLOBAL_ALPHA, &val),
|
Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_GLOBAL_ALPHA, &val),
|
||||||
@ -331,7 +331,7 @@ void QQnxWindow::setOpacity(qreal level)
|
|||||||
|
|
||||||
void QQnxWindow::setExposed(bool exposed)
|
void QQnxWindow::setExposed(bool exposed)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "expose =" << exposed;
|
qWindowDebug() << "window =" << window() << "expose =" << exposed;
|
||||||
|
|
||||||
if (m_exposed != exposed) {
|
if (m_exposed != exposed) {
|
||||||
m_exposed = exposed;
|
m_exposed = exposed;
|
||||||
@ -346,7 +346,7 @@ bool QQnxWindow::isExposed() const
|
|||||||
|
|
||||||
void QQnxWindow::setBufferSize(const QSize &size)
|
void QQnxWindow::setBufferSize(const QSize &size)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "size =" << size;
|
qWindowDebug() << "window =" << window() << "size =" << size;
|
||||||
|
|
||||||
// libscreen fails when creating empty buffers
|
// libscreen fails when creating empty buffers
|
||||||
const QSize nonEmptySize = size.isEmpty() ? QSize(1, 1) : size;
|
const QSize nonEmptySize = size.isEmpty() ? QSize(1, 1) : size;
|
||||||
@ -408,7 +408,7 @@ void QQnxWindow::setBufferSize(const QSize &size)
|
|||||||
|
|
||||||
void QQnxWindow::setScreen(QQnxScreen *platformScreen)
|
void QQnxWindow::setScreen(QQnxScreen *platformScreen)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "platformScreen =" << platformScreen;
|
qWindowDebug() << "window =" << window() << "platformScreen =" << platformScreen;
|
||||||
|
|
||||||
if (platformScreen == 0) { // The screen has been destroyed
|
if (platformScreen == 0) { // The screen has been destroyed
|
||||||
m_screen = 0;
|
m_screen = 0;
|
||||||
@ -422,7 +422,7 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_screen) {
|
if (m_screen) {
|
||||||
qWindowDebug() << Q_FUNC_INFO << "Moving window to different screen";
|
qWindowDebug("Moving window to different screen");
|
||||||
m_screen->removeWindow(this);
|
m_screen->removeWindow(this);
|
||||||
|
|
||||||
if ((QQnxIntegration::options() & QQnxIntegration::RootWindow)) {
|
if ((QQnxIntegration::options() & QQnxIntegration::RootWindow)) {
|
||||||
@ -453,7 +453,7 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen)
|
|||||||
|
|
||||||
void QQnxWindow::removeFromParent()
|
void QQnxWindow::removeFromParent()
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qWindowDebug() << "window =" << window();
|
||||||
// Remove from old Hierarchy position
|
// Remove from old Hierarchy position
|
||||||
if (m_parentWindow) {
|
if (m_parentWindow) {
|
||||||
if (m_parentWindow->m_childWindows.removeAll(this))
|
if (m_parentWindow->m_childWindows.removeAll(this))
|
||||||
@ -467,7 +467,7 @@ void QQnxWindow::removeFromParent()
|
|||||||
|
|
||||||
void QQnxWindow::setParent(const QPlatformWindow *window)
|
void QQnxWindow::setParent(const QPlatformWindow *window)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << this->window() << "platformWindow =" << window;
|
qWindowDebug() << "window =" << this->window() << "platformWindow =" << window;
|
||||||
// Cast away the const, we need to modify the hierarchy.
|
// Cast away the const, we need to modify the hierarchy.
|
||||||
QQnxWindow* const newParent = static_cast<QQnxWindow*>(const_cast<QPlatformWindow*>(window));
|
QQnxWindow* const newParent = static_cast<QQnxWindow*>(const_cast<QPlatformWindow*>(window));
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ void QQnxWindow::setParent(const QPlatformWindow *window)
|
|||||||
|
|
||||||
void QQnxWindow::raise()
|
void QQnxWindow::raise()
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qWindowDebug() << "window =" << window();
|
||||||
|
|
||||||
if (m_parentWindow) {
|
if (m_parentWindow) {
|
||||||
m_parentWindow->m_childWindows.removeAll(this);
|
m_parentWindow->m_childWindows.removeAll(this);
|
||||||
@ -513,7 +513,7 @@ void QQnxWindow::raise()
|
|||||||
|
|
||||||
void QQnxWindow::lower()
|
void QQnxWindow::lower()
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "window =" << window();
|
qWindowDebug() << "window =" << window();
|
||||||
|
|
||||||
if (m_parentWindow) {
|
if (m_parentWindow) {
|
||||||
m_parentWindow->m_childWindows.removeAll(this);
|
m_parentWindow->m_childWindows.removeAll(this);
|
||||||
@ -583,7 +583,7 @@ void QQnxWindow::setFocus(screen_window_t newFocusWindow)
|
|||||||
|
|
||||||
void QQnxWindow::setWindowState(Qt::WindowState state)
|
void QQnxWindow::setWindowState(Qt::WindowState state)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "state =" << state;
|
qWindowDebug() << "state =" << state;
|
||||||
|
|
||||||
// Prevent two calls with Qt::WindowFullScreen from changing m_unmaximizedGeometry
|
// Prevent two calls with Qt::WindowFullScreen from changing m_unmaximizedGeometry
|
||||||
if (m_windowState == state)
|
if (m_windowState == state)
|
||||||
@ -598,7 +598,7 @@ void QQnxWindow::setWindowState(Qt::WindowState state)
|
|||||||
void QQnxWindow::propagateSizeHints()
|
void QQnxWindow::propagateSizeHints()
|
||||||
{
|
{
|
||||||
// nothing to do; silence base class warning
|
// nothing to do; silence base class warning
|
||||||
qWindowDebug() << Q_FUNC_INFO << ": ignored";
|
qWindowDebug("ignored");
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQnxWindow::setMMRendererWindowName(const QString &name)
|
void QQnxWindow::setMMRendererWindowName(const QString &name)
|
||||||
@ -634,7 +634,7 @@ QQnxWindow *QQnxWindow::findWindow(screen_window_t windowHandle)
|
|||||||
void QQnxWindow::minimize()
|
void QQnxWindow::minimize()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_BLACKBERRY)
|
#if defined(Q_OS_BLACKBERRY)
|
||||||
qWindowDebug() << Q_FUNC_INFO;
|
qWindowDebug();
|
||||||
|
|
||||||
pps_encoder_t encoder;
|
pps_encoder_t encoder;
|
||||||
|
|
||||||
@ -643,7 +643,7 @@ void QQnxWindow::minimize()
|
|||||||
|
|
||||||
if (navigator_raw_write(pps_encoder_buffer(&encoder),
|
if (navigator_raw_write(pps_encoder_buffer(&encoder),
|
||||||
pps_encoder_length(&encoder)) != BPS_SUCCESS) {
|
pps_encoder_length(&encoder)) != BPS_SUCCESS) {
|
||||||
qWindowDebug() << Q_FUNC_INFO << "navigator_raw_write failed:" << strerror(errno);
|
qWindowDebug() << "navigator_raw_write failed:" << strerror(errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
pps_encoder_cleanup(&encoder);
|
pps_encoder_cleanup(&encoder);
|
||||||
@ -654,7 +654,7 @@ void QQnxWindow::minimize()
|
|||||||
|
|
||||||
void QQnxWindow::setRotation(int rotation)
|
void QQnxWindow::setRotation(int rotation)
|
||||||
{
|
{
|
||||||
qWindowDebug() << Q_FUNC_INFO << "angle =" << rotation;
|
qWindowDebug() << "angle =" << rotation;
|
||||||
Q_SCREEN_CHECKERROR(
|
Q_SCREEN_CHECKERROR(
|
||||||
screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ROTATION, &rotation),
|
screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ROTATION, &rotation),
|
||||||
"Failed to set window rotation");
|
"Failed to set window rotation");
|
||||||
@ -726,7 +726,7 @@ void QQnxWindow::joinWindowGroup(const QByteArray &groupName)
|
|||||||
{
|
{
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
qWindowDebug() << Q_FUNC_INFO << "group:" << groupName;
|
qWindowDebug() << "group:" << groupName;
|
||||||
|
|
||||||
if (!groupName.isEmpty()) {
|
if (!groupName.isEmpty()) {
|
||||||
if (groupName != m_parentGroupName) {
|
if (groupName != m_parentGroupName) {
|
||||||
|
@ -236,7 +236,7 @@ void QWindowsClipboard::propagateClipboardMessage(UINT message, WPARAM wParam, L
|
|||||||
// suspended by a shell prompt 'Select' or debugger).
|
// suspended by a shell prompt 'Select' or debugger).
|
||||||
if (QWindowsContext::user32dll.isHungAppWindow
|
if (QWindowsContext::user32dll.isHungAppWindow
|
||||||
&& QWindowsContext::user32dll.isHungAppWindow(m_nextClipboardViewer)) {
|
&& QWindowsContext::user32dll.isHungAppWindow(m_nextClipboardViewer)) {
|
||||||
qWarning("%s: Cowardly refusing to send clipboard message to hung application...", Q_FUNC_INFO);
|
qWarning("Cowardly refusing to send clipboard message to hung application...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Do not block if the process is being debugged, specifically, if it is
|
// Do not block if the process is being debugged, specifically, if it is
|
||||||
|
@ -463,7 +463,7 @@ static int choosePixelFormat(HDC hdc, const QSurfaceFormat &format,
|
|||||||
PIXELFORMATDESCRIPTOR *obtainedPfd)
|
PIXELFORMATDESCRIPTOR *obtainedPfd)
|
||||||
{
|
{
|
||||||
if (QOpenGLStaticContext::opengl32.moduleIsNotOpengl32()) {
|
if (QOpenGLStaticContext::opengl32.moduleIsNotOpengl32()) {
|
||||||
qWarning("%s: Attempted to use GDI functions with a non-opengl32.dll library", Q_FUNC_INFO);
|
qWarning("Attempted to use GDI functions with a non-opengl32.dll library");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1018,7 +1018,7 @@ QByteArray QOpenGLStaticContext::getGlString(unsigned int which)
|
|||||||
QOpenGLStaticContext *QOpenGLStaticContext::create(bool softwareRendering)
|
QOpenGLStaticContext *QOpenGLStaticContext::create(bool softwareRendering)
|
||||||
{
|
{
|
||||||
if (!opengl32.init(softwareRendering)) {
|
if (!opengl32.init(softwareRendering)) {
|
||||||
qWarning("%s: Failed to load and resolve WGL/OpenGL functions", Q_FUNC_INFO);
|
qWarning("Failed to load and resolve WGL/OpenGL functions");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ QWinRTInputContext::QWinRTInputContext(QWinRTScreen *screen)
|
|||||||
IInputPaneStatics *statics;
|
IInputPaneStatics *statics;
|
||||||
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_ViewManagement_InputPane).Get(),
|
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_ViewManagement_InputPane).Get(),
|
||||||
&statics))) {
|
&statics))) {
|
||||||
qWarning(Q_FUNC_INFO ": failed to retrieve input pane statics.");
|
qWarning("failed to retrieve input pane statics.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ QWinRTInputContext::QWinRTInputContext(QWinRTScreen *screen)
|
|||||||
m_keyboardRect = getInputPaneRect(inputPane, m_screen->scaleFactor());
|
m_keyboardRect = getInputPaneRect(inputPane, m_screen->scaleFactor());
|
||||||
m_isInputPanelVisible = !m_keyboardRect.isEmpty();
|
m_isInputPanelVisible = !m_keyboardRect.isEmpty();
|
||||||
} else {
|
} else {
|
||||||
qWarning(Q_FUNC_INFO ": failed to retrieve InputPane.");
|
qWarning("failed to retrieve InputPane.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
char byteOrder = xSettings.at(0);
|
char byteOrder = xSettings.at(0);
|
||||||
if (byteOrder != LSBFirst && byteOrder != MSBFirst) {
|
if (byteOrder != LSBFirst && byteOrder != MSBFirst) {
|
||||||
qWarning("%s ByteOrder byte %d not 0 or 1", Q_FUNC_INFO , byteOrder);
|
qWarning("ByteOrder byte %d not 0 or 1", byteOrder);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ public:
|
|||||||
qFromBigEndian<t>((const uchar *)(x)))
|
qFromBigEndian<t>((const uchar *)(x)))
|
||||||
#define VALIDATE_LENGTH(x) \
|
#define VALIDATE_LENGTH(x) \
|
||||||
if ((size_t)xSettings.length() < (offset + local_offset + 12 + x)) { \
|
if ((size_t)xSettings.length() < (offset + local_offset + 12 + x)) { \
|
||||||
qWarning("%s Length %d runs past end of data", Q_FUNC_INFO , x); \
|
qWarning("Length %d runs past end of data", x); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,13 +135,12 @@ public:
|
|||||||
for (int i = 0; eventList().isEmpty() && i < 5; ++i)
|
for (int i = 0; eventList().isEmpty() && i < 5; ++i)
|
||||||
QTest::qWait(50);
|
QTest::qWait(50);
|
||||||
if (eventList().isEmpty()) {
|
if (eventList().isEmpty()) {
|
||||||
qWarning("%s: Timeout waiting for accessibility event.", Q_FUNC_INFO);
|
qWarning("Timeout waiting for accessibility event.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const bool res = *eventList().first() == *ev;
|
const bool res = *eventList().first() == *ev;
|
||||||
if (!res)
|
if (!res)
|
||||||
qWarning("%s: %s", Q_FUNC_INFO,
|
qWarning("%s", qPrintable(msgAccessibilityEventListMismatch(eventList(), ev)));
|
||||||
qPrintable(msgAccessibilityEventListMismatch(eventList(), ev)));
|
|
||||||
delete eventList().takeFirst();
|
delete eventList().takeFirst();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -172,9 +171,9 @@ private:
|
|||||||
if (object) {
|
if (object) {
|
||||||
QGuiApplication* app = qobject_cast<QGuiApplication*>(object);
|
QGuiApplication* app = qobject_cast<QGuiApplication*>(object);
|
||||||
if ( !app )
|
if ( !app )
|
||||||
qWarning("%s: root Object is not a QGuiApplication!", Q_FUNC_INFO);
|
qWarning("root Object is not a QGuiApplication!");
|
||||||
} else {
|
} else {
|
||||||
qWarning("%s: root Object called with 0 pointer", Q_FUNC_INFO);
|
qWarning("root Object called with 0 pointer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,6 @@ QDebug operator<<(QDebug str, const QSpanCollection::Span &span)
|
|||||||
void QSpanCollection::updateInsertedRows(int start, int end)
|
void QSpanCollection::updateInsertedRows(int start, int end)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SPAN_UPDATE
|
#ifdef DEBUG_SPAN_UPDATE
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
qDebug() << start << end;
|
qDebug() << start << end;
|
||||||
qDebug() << index;
|
qDebug() << index;
|
||||||
#endif
|
#endif
|
||||||
@ -251,7 +250,6 @@ void QSpanCollection::updateInsertedRows(int start, int end)
|
|||||||
void QSpanCollection::updateInsertedColumns(int start, int end)
|
void QSpanCollection::updateInsertedColumns(int start, int end)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SPAN_UPDATE
|
#ifdef DEBUG_SPAN_UPDATE
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
qDebug() << start << end;
|
qDebug() << start << end;
|
||||||
qDebug() << index;
|
qDebug() << index;
|
||||||
#endif
|
#endif
|
||||||
@ -334,7 +332,6 @@ bool QSpanCollection::cleanSpanSubIndex(QSpanCollection::SubIndex &subindex, int
|
|||||||
void QSpanCollection::updateRemovedRows(int start, int end)
|
void QSpanCollection::updateRemovedRows(int start, int end)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SPAN_UPDATE
|
#ifdef DEBUG_SPAN_UPDATE
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
qDebug() << start << end;
|
qDebug() << start << end;
|
||||||
qDebug() << index;
|
qDebug() << index;
|
||||||
#endif
|
#endif
|
||||||
@ -463,7 +460,6 @@ void QSpanCollection::updateRemovedRows(int start, int end)
|
|||||||
void QSpanCollection::updateRemovedColumns(int start, int end)
|
void QSpanCollection::updateRemovedColumns(int start, int end)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SPAN_UPDATE
|
#ifdef DEBUG_SPAN_UPDATE
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
qDebug() << start << end;
|
qDebug() << start << end;
|
||||||
qDebug() << index;
|
qDebug() << index;
|
||||||
#endif
|
#endif
|
||||||
|
@ -795,7 +795,7 @@ void QWidgetWindow::handleDragLeaveEvent(QDragLeaveEvent *event)
|
|||||||
void QWidgetWindow::handleDropEvent(QDropEvent *event)
|
void QWidgetWindow::handleDropEvent(QDropEvent *event)
|
||||||
{
|
{
|
||||||
if (m_dragTarget.isNull()) {
|
if (m_dragTarget.isNull()) {
|
||||||
qWarning() << Q_FUNC_INFO << m_widget << ": No drag target set.";
|
qWarning() << m_widget << ": No drag target set.";
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2472,12 +2472,12 @@ bool QWindowsVistaStylePrivate::initTreeViewTheming()
|
|||||||
|
|
||||||
m_treeViewHelper = createTreeViewHelperWindow();
|
m_treeViewHelper = createTreeViewHelperWindow();
|
||||||
if (!m_treeViewHelper) {
|
if (!m_treeViewHelper) {
|
||||||
qWarning("%s: Unable to create the treeview helper window.", Q_FUNC_INFO);
|
qWarning("Unable to create the treeview helper window.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const HRESULT hr = QWindowsXPStylePrivate::pSetWindowTheme(m_treeViewHelper, L"explorer", NULL);
|
const HRESULT hr = QWindowsXPStylePrivate::pSetWindowTheme(m_treeViewHelper, L"explorer", NULL);
|
||||||
if (hr != S_OK) {
|
if (hr != S_OK) {
|
||||||
qErrnoWarning("%s: SetWindowTheme() failed.", Q_FUNC_INFO);
|
qErrnoWarning("SetWindowTheme() failed.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return QWindowsXPStylePrivate::createTheme(QWindowsXPStylePrivate::TreeViewTheme, m_treeViewHelper);
|
return QWindowsXPStylePrivate::createTheme(QWindowsXPStylePrivate::TreeViewTheme, m_treeViewHelper);
|
||||||
|
@ -338,15 +338,15 @@ void QWindowsXPStylePrivate::cleanupHandleMap()
|
|||||||
HTHEME QWindowsXPStylePrivate::createTheme(int theme, HWND hwnd)
|
HTHEME QWindowsXPStylePrivate::createTheme(int theme, HWND hwnd)
|
||||||
{
|
{
|
||||||
if (theme < 0 || theme >= NThemes || !hwnd) {
|
if (theme < 0 || theme >= NThemes || !hwnd) {
|
||||||
qWarning("%s: Invalid parameters #%d, %p", Q_FUNC_INFO, theme, hwnd);
|
qWarning("Invalid parameters #%d, %p", theme, hwnd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!m_themes[theme]) {
|
if (!m_themes[theme]) {
|
||||||
const wchar_t *name = themeNames[theme];
|
const wchar_t *name = themeNames[theme];
|
||||||
m_themes[theme] = pOpenThemeData(hwnd, name);
|
m_themes[theme] = pOpenThemeData(hwnd, name);
|
||||||
if (!m_themes[theme])
|
if (!m_themes[theme])
|
||||||
qErrnoWarning("%s: OpenThemeData() failed for theme %d (%s).",
|
qErrnoWarning("OpenThemeData() failed for theme %d (%s).",
|
||||||
Q_FUNC_INFO, theme, qPrintable(themeName(theme)));
|
theme, qPrintable(themeName(theme)));
|
||||||
}
|
}
|
||||||
return m_themes[theme];
|
return m_themes[theme];
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ void QSystemTrayIconPrivate::install_sys()
|
|||||||
sys->createIcon();
|
sys->createIcon();
|
||||||
sys->trayMessage(NIM_ADD);
|
sys->trayMessage(NIM_ADD);
|
||||||
} else {
|
} else {
|
||||||
qWarning("%s: The platform plugin failed to create a message window.", Q_FUNC_INFO);
|
qWarning("The platform plugin failed to create a message window.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1129,7 +1129,7 @@ QLayoutItem *QToolBarAreaLayout::plug(const QList<int> &path)
|
|||||||
{
|
{
|
||||||
QToolBarAreaLayoutItem *item = this->item(path);
|
QToolBarAreaLayoutItem *item = this->item(path);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
qWarning() << Q_FUNC_INFO << "No item at" << path;
|
qWarning() << "No item at" << path;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Q_ASSERT(item->gap);
|
Q_ASSERT(item->gap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user