From b909816fa4f74677c205854ae898ee57677ca317 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 26 Apr 2010 23:15:26 +0100 Subject: Slight QList documentation fix. Mentioning that the operation is constant time is fine, however, saying that it is fast because it preallocates 'to allow fast growth' seems a little bit confusing given these methods are related to item removal. --- src/corelib/tools/qlist.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 6f5bb9b..6cc6fc1 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -853,9 +853,7 @@ void **QListData::erase(void **xi) same as takeAt(0). This function assumes the list is not empty. To avoid failure, call isEmpty() before calling this function. - This operation is very fast (\l{constant time}), because QList - preallocates extra space on both sides of its internal buffer to - allow for fast growth at both ends of the list. + This operation takes \l{constant time}. If you don't use the return value, removeFirst() is more efficient. @@ -870,9 +868,7 @@ void **QListData::erase(void **xi) not empty. To avoid failure, call isEmpty() before calling this function. - This operation is very fast (\l{constant time}), because QList - preallocates extra space on both sides of its internal buffer to - allow for fast growth at both ends of the list. + This operation takes \l{constant time}. If you don't use the return value, removeLast() is more efficient. -- cgit v0.12 From 6749edd4c6f647c4963793183a452bb1ae769c1c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 27 Apr 2010 10:43:52 +0200 Subject: qdoc: Removed MacRefs for Xcode documentation stuff. Also added the infrastructure for generating breadcrumbs. --- tools/qdoc3/htmlgenerator.cpp | 39 +++++++++++++++++++++++++++++ tools/qdoc3/htmlgenerator.h | 9 ++++++- tools/qdoc3/test/qt-html-templates.qdocconf | 5 ++-- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 6b7d350..01dc26c 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -259,6 +259,9 @@ void HtmlGenerator::initializeGenerator(const Config &config) postHeader = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTHEADER); + postPostHeader = config.getString(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_POSTPOSTHEADER); footer = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_FOOTER); @@ -1697,6 +1700,27 @@ QString HtmlGenerator::fileExtension(const Node * /* node */) const #endif +void HtmlGenerator::generateBreadCrumbs(const QString& title, + const Node *node, + CodeMarker *marker) +{ + if (node->type() == Node::Class) { + } + else if (node->type() == Node::Fake) { + if (node->subType() == Node::Module) { + } + else if (node->subType() == Node::Page) { + } + else if (node->subType() == Node::QmlClass) { + } + else if (node->subType() == Node::Example) { + } + } + else if (node->type() == Node::Namespace) { + } +} + + void HtmlGenerator::generateHeader(const QString& title, const Node *node, CodeMarker *marker, @@ -1748,9 +1772,13 @@ void HtmlGenerator::generateHeader(const QString& title, else out() << "\n"; +#ifdef GENERATE_MAC_REFS if (mainPage) generateMacRef(node, marker); +#endif out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); + generateBreadCrumbs(title,node,marker); + out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); #if 0 // Removed for new docf format. MWS if (node && !node->links().empty()) @@ -3687,10 +3715,14 @@ void HtmlGenerator::generateDetailedMember(const Node *node, { const EnumNode *enume; +#ifdef GENERATE_MAC_REFS generateMacRef(node, marker); +#endif if (node->type() == Node::Enum && (enume = static_cast(node))->flagsType()) { +#ifdef GENERATE_MAC_REFS generateMacRef(enume->flagsType(), marker); +#endif out() << "

"; out() << ""; generateSynopsis(enume, relative, marker, CodeMarker::Detailed); @@ -4204,6 +4236,10 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker) } } +#ifdef GENERATE_MAC_REFS +/* + No longer valid. + */ void HtmlGenerator::generateMacRef(const Node *node, CodeMarker *marker) { if (!pleaseGenerateMacRef || marker == 0) @@ -4213,6 +4249,7 @@ void HtmlGenerator::generateMacRef(const Node *node, CodeMarker *marker) foreach (const QString &macRef, macRefs) out() << "\n"; } +#endif void HtmlGenerator::beginLink(const QString &link, const Node *node, @@ -4314,7 +4351,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, CodeMarker *marker) { const QmlPropertyNode* qpn = 0; +#ifdef GENERATE_MAC_REFS generateMacRef(node, marker); +#endif out() << "
"; if (node->subType() == Node::QmlPropertyGroup) { const QmlPropGroupNode* qpgn = static_cast(node); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 2a365e9..68e620e 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -131,6 +131,9 @@ class HtmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker, const Atom *atom = 0); + void generateBreadCrumbs(const QString& title, + const Node *node, + CodeMarker *marker); void generateHeader(const QString& title, const Node *node = 0, CodeMarker *marker = 0, bool mainPage = true); void generateTitle(const QString& title, @@ -262,7 +265,9 @@ class HtmlGenerator : public PageGenerator virtual void generateIndex(const QString &fileBase, const QString &url, const QString &title); +#ifdef GENERATE_MAC_REFS void generateMacRef(const Node *node, CodeMarker *marker); +#endif void beginLink(const QString &link, const Node *node, const Node *relative, @@ -303,6 +308,7 @@ class HtmlGenerator : public PageGenerator QRegExp funcLeftParen; QString style; QString postHeader; + QString postPostHeader; QString footer; QString address; bool pleaseGenerateMacRef; @@ -337,8 +343,9 @@ class HtmlGenerator : public PageGenerator #define HTMLGENERATOR_ADDRESS "address" #define HTMLGENERATOR_FOOTER "footer" -#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me +#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me #define HTMLGENERATOR_POSTHEADER "postheader" +#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" #define HTMLGENERATOR_STYLE "style" #define HTMLGENERATOR_STYLESHEETS "stylesheets" #define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements" diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 158aef3..ba0783e 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -87,8 +87,9 @@ HTML.postheader = "
\n" \ "
\n" \ "
    \n" \ "
  • Home
  • \n" \ - " \n" \ - "
\n" \ + " \n" + +HTML.postpostheader = " \n" \ "
\n" \ "
\n" \ "
    \n" \ -- cgit v0.12 From 4580c2e9c2bbcb911f9e1cecd4551054598d256d Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Tue, 27 Apr 2010 13:26:42 +0200 Subject: QTabWidget documentMode not working correctly on Mac This feature was implemented in Carbon and was never ported to Cocoa. The major problem is the fact that Cocoa draws a line under the titlebar, regardless of what we say. The only way to avoid drawing that line is by adding a native toolbar and ask it not to draw its baseline. If there is not toolbar, as it happens in this case, there is no way to prevent that line from being drawn. So instead we paint over that line and hope for the best. Task-number: QTBUG-8159 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 54 ++++++++++ src/gui/kernel/qt_cocoa_helpers_mac.mm | 120 ++++++++++++++++++++++- src/gui/kernel/qt_cocoa_helpers_mac_p.h | 5 + src/gui/kernel/qt_mac_p.h | 1 + src/gui/kernel/qwidget.cpp | 27 +++++ src/gui/kernel/qwidget_p.h | 7 ++ src/gui/widgets/qtabbar.cpp | 19 +++- 7 files changed, 227 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index e94d247..8652816 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -363,3 +363,57 @@ QT_END_NAMESPACE } [super displayIfNeeded]; } + +// This is a hack and it should be removed once we find the real cause for +// the painting problems. +// We have a static variable that signals if we have been called before or not. +static bool firstDrawingInvocation = true; + +// The method below exists only as a workaround to draw/not draw the baseline +// in the title bar. This is to support unifiedToolbar look. + +// This method is very special. To begin with, it is a +// method that will get called only if we enable documentMode. +// Furthermore, it won't get called as a normal method, we swap +// this method with the normal implementation of drawRect in +// _NSThemeFrame. When this method is active, its mission is to +// first call the original drawRect implementation so the widget +// gets proper painting. After that, it needs to detect if there +// is a toolbar or not, in order to decide how to handle the unified +// look. The distinction is important since the presence and +// visibility of a toolbar change the way we enter into unified mode. +// When there is a toolbar and that toolbar is visible, the problem +// is as simple as to tell the toolbar not to draw its baseline. +// However when there is not toolbar or the toolbar is not visible, +// we need to draw a line on top of the baseline, because the baseline +// in that case will belong to the title. For this case we need to draw +// a line on top of the baseline. +// As usual, there is a special case. When we first are called, we might +// need to repaint ourselves one more time. We only need that if we +// didn't get the activation, i.e. when we are launched via the command +// line. And this only if the toolbar is visible from the beginning, +// so we have a special flag that signals if we need to repaint or not. +- (void)drawRectSpecial:(NSRect)rect +{ + // Call the original drawing method. + [self drawRectOriginal:rect]; + NSWindow *window = [self window]; + NSToolbar *toolbar = [window toolbar]; + if(!toolbar) { + // There is no toolbar, we have to draw a line on top of the line drawn by Cocoa. + macDrawRectOnTop((void *)window); + } else { + if([toolbar isVisible]) { + // We tell Cocoa to avoid drawing the line at the end. + if(firstDrawingInvocation) { + firstDrawingInvocation = false; + macSyncDrawingOnFirstInvocation((void *)window); + } else + [toolbar setShowsBaselineSeparator:NO]; + } else { + // There is a toolbar but it is not visible so + // we have to draw a line on top of the line drawn by Cocoa. + macDrawRectOnTop((void *)window); + } + } +} diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index a05c7d5..024c1fc 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1163,15 +1163,81 @@ void qt_mac_updateContentBorderMetricts(void * /*OSWindowRef */window, const ::H #endif } +#if QT_MAC_USE_COCOA +void qt_mac_replaceDrawRect(void * /*OSWindowRef */window, QWidgetPrivate *widget) +{ + QMacCocoaAutoReleasePool pool; + OSWindowRef theWindow = static_cast(window); + if(!theWindow) + return; + id theClass = [[[theWindow contentView] superview] class]; + // What we do here is basically to add a new selector to NSThemeFrame called + // "drawRectOriginal:" which will contain the original implementation of + // "drawRect:". After that we get the new implementation from QCocoaWindow + // and exchange them. The new implementation is called drawRectSpecial. + // We cannot just add the method because it might have been added before and since + // we cannot remove a method once it has been added we need to ask QCocoaWindow if + // we did the swap or not. + if(!widget->drawRectOriginalAdded) { + Method m2 = class_getInstanceMethod(theClass, @selector(drawRect:)); + if(!m2) { + // This case is pretty extreme, no drawRect means no drawing! + return; + } + class_addMethod(theClass, @selector(drawRectOriginal:), method_getImplementation(m2), method_getTypeEncoding(m2)); + widget->drawRectOriginalAdded = true; + } + if(widget->originalDrawMethod) { + Method m0 = class_getInstanceMethod([theWindow class], @selector(drawRectSpecial:)); + if(!m0) { + // Ok, this means the methods were never swapped. Just ignore + return; + } + Method m1 = class_getInstanceMethod(theClass, @selector(drawRect:)); + if(!m1) { + // Ok, this means the methods were never swapped. Just ignore + return; + } + // We have the original method here. Proceed and swap the methods. + method_exchangeImplementations(m1, m0); + widget->originalDrawMethod = false; + [window display]; + } +} + +void qt_mac_replaceDrawRectOriginal(void * /*OSWindowRef */window, QWidgetPrivate *widget) +{ + QMacCocoaAutoReleasePool pool; + OSWindowRef theWindow = static_cast(window); + id theClass = [[[theWindow contentView] superview] class]; + // Now we need to revert the methods to their original state. + // We cannot remove the method, so we just keep track of it in QCocoaWindow. + Method m0 = class_getInstanceMethod([theWindow class], @selector(drawRectSpecial:)); + if(!m0) { + // Ok, this means the methods were never swapped. Just ignore + return; + } + Method m1 = class_getInstanceMethod(theClass, @selector(drawRect:)); + if(!m1) { + // Ok, this means the methods were never swapped. Just ignore + return; + } + method_exchangeImplementations(m1, m0); + widget->originalDrawMethod = true; + [window display]; +} +#endif // QT_MAC_USE_COCOA + void qt_mac_showBaseLineSeparator(void * /*OSWindowRef */window, bool show) { + if(!window) + return; #if QT_MAC_USE_COCOA QMacCocoaAutoReleasePool pool; OSWindowRef theWindow = static_cast(window); NSToolbar *macToolbar = [theWindow toolbar]; - if (macToolbar) - [macToolbar setShowsBaselineSeparator: show]; -#endif + [macToolbar setShowsBaselineSeparator:show]; +#endif // QT_MAC_USE_COCOA } QStringList qt_mac_NSArrayToQStringList(void *nsarray) @@ -1403,4 +1469,52 @@ void qt_mac_post_retranslateAppMenu() #endif } +#ifdef QT_MAC_USE_COCOA +// This method implements the magic for the drawRectSpecial method. +// We draw a line at the upper edge of the content view in order to +// override the title baseline. +void macDrawRectOnTop(void * /*OSWindowRef */window) +{ + OSWindowRef theWindow = static_cast(window); + NSView *contentView = [theWindow contentView]; + if(!contentView) + return; + // Get coordinates of the content view + NSRect contentRect = [contentView frame]; + // Draw a line on top of the already drawn line. + // We need to check if we are active or not to use the proper color. + if([window isKeyWindow] || [window isMainWindow]) { + [[NSColor colorWithCalibratedRed:1.0 green:1.0 blue:1.0 alpha:1.0] set]; + } else { + [[NSColor colorWithCalibratedRed:1.0 green:1.0 blue:1.0 alpha:1.0] set]; + } + NSPoint origin = NSMakePoint(0, contentRect.size.height); + NSPoint end = NSMakePoint(contentRect.size.width, contentRect.size.height); + [NSBezierPath strokeLineFromPoint:origin toPoint:end]; +} + +// This method will (or at least should) get called only once. +// Its mission is to find out if we are active or not. If we are active +// we assume that we were launched via finder, otherwise we assume +// we were called from the command line. The distinction is important, +// since in the first case we don't need to trigger a paintEvent, while +// in the second case we do. +void macSyncDrawingOnFirstInvocation(void * /*OSWindowRef */window) +{ + OSWindowRef theWindow = static_cast(window); + NSApplication *application = [NSApplication sharedApplication]; + NSToolbar *toolbar = [window toolbar]; + if([application isActive]) { + // Launched from finder + [toolbar setShowsBaselineSeparator:NO]; + } else { + // Launched from commandline + [toolbar setVisible:false]; + [toolbar setShowsBaselineSeparator:NO]; + [toolbar setVisible:true]; + [theWindow display]; + } +} +#endif // QT_MAC_USE_COCOA + QT_END_NAMESPACE diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index 3fd62a4..5db121a 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -131,6 +131,8 @@ void macWindowSetHasShadow( void * /*OSWindowRef*/ window, bool hasShadow ); void macWindowFlush(void * /*OSWindowRef*/ window); void macSendToolbarChangeEvent(QWidget *widget); void qt_mac_updateContentBorderMetricts(void * /*OSWindowRef */window, const ::HIContentBorderMetrics &metrics); +void qt_mac_replaceDrawRect(void * /*OSWindowRef */window, QWidgetPrivate *widget); +void qt_mac_replaceDrawRectOriginal(void * /*OSWindowRef */window, QWidgetPrivate *widget); void qt_mac_showBaseLineSeparator(void * /*OSWindowRef */window, bool show); void * /*NSImage */qt_mac_create_nsimage(const QPixmap &pm); void qt_mac_update_mouseTracking(QWidget *widget); @@ -140,6 +142,9 @@ void qt_dispatchTabletProximityEvent(void * /*NSEvent * */ tabletEvent); #ifdef QT_MAC_USE_COCOA bool qt_dispatchKeyEventWithCocoa(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent); void qt_cocoaChangeOverrideCursor(const QCursor &cursor); +// These methods exists only for supporting unified mode. +void macDrawRectOnTop(void * /*OSWindowRef */ window); +void macSyncDrawingOnFirstInvocation(void * /*OSWindowRef */window); #endif void qt_mac_menu_collapseSeparators(void * /*NSMenu */ menu, bool collapse); bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent); diff --git a/src/gui/kernel/qt_mac_p.h b/src/gui/kernel/qt_mac_p.h index 7bfb257..3341ce1 100644 --- a/src/gui/kernel/qt_mac_p.h +++ b/src/gui/kernel/qt_mac_p.h @@ -57,6 +57,7 @@ #ifdef __OBJC__ #include +#include #endif #include diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 441e823..cf952aa 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -220,6 +220,11 @@ QWidgetPrivate::QWidgetPrivate(int version) isWidget = true; memset(high_attributes, 0, sizeof(high_attributes)); +#if QT_MAC_USE_COCOA + drawRectOriginalAdded = false; + originalDrawMethod = true; + changeMethods = false; +#endif // QT_MAC_USE_COCOA #ifdef QWIDGET_EXTRA_DEBUG static int count = 0; qDebug() << "widgets" << ++count; @@ -12292,6 +12297,28 @@ void QWidgetPrivate::_q_delayedDestroy(WId winId) } #endif +#if QT_MAC_USE_COCOA +void QWidgetPrivate::syncUnifiedMode() { + // The whole purpose of this method is to keep the unifiedToolbar in sync. + // That means making sure we either exchange the drawing methods or we let + // the toolbar know that it does not require to draw the baseline. + Q_Q(QWidget); + // This function makes sense only if this is a top level + if(!q->isWindow()) + return; + OSWindowRef window = qt_mac_window_for(q); + if(changeMethods) { + // Ok, we are in documentMode. + if(originalDrawMethod) + qt_mac_replaceDrawRect(window, this); + } else { + if(!originalDrawMethod) + qt_mac_replaceDrawRectOriginal(window, this); + } +} + +#endif // QT_MAC_USE_COCOA + QT_END_NAMESPACE #include "moc_qwidget.cpp" diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 89ea256..cad60b5 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -773,6 +773,13 @@ public: void finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ windowRef); void syncCocoaMask(); void finishCocoaMaskSetup(); + void syncUnifiedMode(); + // Did we add the drawRectOriginal method? + bool drawRectOriginalAdded; + // Is the original drawRect method available? + bool originalDrawMethod; + // Do we need to change the methods? + bool changeMethods; #endif void determineWindowClass(); void transferChildren(); diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index d03a2f4..8aaaade 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -69,6 +69,7 @@ QT_BEGIN_NAMESPACE + inline static bool verticalTabs(QTabBar::Shape shape) { return shape == QTabBar::RoundedWest @@ -95,9 +96,20 @@ void QTabBarPrivate::updateMacBorderMetrics() metrics.left = 0; metrics.right = 0; qt_mac_updateContentBorderMetricts(window, metrics); - - // hide the base line separator if the tabs have docuemnt mode enabled (Cocoa) - qt_mac_showBaseLineSeparator(window, !documentMode); +#if QT_MAC_USE_COCOA + // In Cocoa we need to keep track of the drawRect method. + // If documentMode is enabled we need to change it, unless + // a toolbar is present. + // Notice that all the information is kept in the window, + // that's why we get the private widget for it instead of + // the private widget for this widget. + QWidgetPrivate *privateWidget = qt_widget_private(q->window()); + if(privateWidget) + privateWidget->changeMethods = documentMode; + // Since in Cocoa there is no simple way to remove the baseline, so we just ask the + // top level to do the magic for us. + privateWidget->syncUnifiedMode(); +#endif // QT_MAC_USE_COCOA } #endif } @@ -2193,6 +2205,7 @@ bool QTabBar::documentMode() const void QTabBar::setDocumentMode(bool enabled) { Q_D(QTabBar); + d->documentMode = enabled; d->updateMacBorderMetrics(); } -- cgit v0.12 From 0f02d27038017a9040c635a8053826671bb10517 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 27 Apr 2010 14:55:11 +0200 Subject: qdoc: Added breadcrumbs for class pages. --- tools/qdoc3/htmlgenerator.cpp | 44 ++++++++++++++++++------------------------- tools/qdoc3/text.h | 2 +- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 01dc26c..8e3b38c 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1674,39 +1674,30 @@ QString HtmlGenerator::fileExtension(const Node * /* node */) const return "html"; } -#if 0 - - - - - Qt Reference Documentation - - - - - - - - - -#endif - void HtmlGenerator::generateBreadCrumbs(const QString& title, const Node *node, CodeMarker *marker) { + Text breadcrumb; if (node->type() == Node::Class) { + ClassNode* cn = static_cast(node); + QString name = node->moduleName(); + if (!name.isEmpty()) { + out() << "
  • "; + breadcrumb << Atom(Atom::AutoLink,name); + generateText(breadcrumb, node, marker); + out() << "
  • \n"; + } + breadcrumb.clear(); + if (!cn->name().isEmpty()) { + out() << "
  • "; + breadcrumb << Atom(Atom::AutoLink,cn->name()); + generateText(breadcrumb, 0, marker); + out() << "
  • \n"; + } } else if (node->type() == Node::Fake) { + const FakeNode* fn = static_cast(node); if (node->subType() == Node::Module) { } else if (node->subType() == Node::Page) { @@ -1717,6 +1708,7 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, } } else if (node->type() == Node::Namespace) { + const NamespaceNode* nsn = static_cast(node); } } diff --git a/tools/qdoc3/text.h b/tools/qdoc3/text.h index fa3ecda..879f6da 100644 --- a/tools/qdoc3/text.h +++ b/tools/qdoc3/text.h @@ -75,6 +75,7 @@ class Text const Atom *lastAtom() const { return last; } Text subText(Atom::Type left, Atom::Type right, const Atom *from = 0) const; void dump() const; + void clear(); static Text subText(const Atom *begin, const Atom *end = 0); static Text sectionHeading(const Atom *sectionBegin); @@ -82,7 +83,6 @@ class Text static int compare(const Text &text1, const Text &text2); private: - void clear(); Atom *first; Atom *last; -- cgit v0.12 From 4c6963fe61f2d7751428669f40bc10d683b4336b Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Tue, 27 Apr 2010 15:37:31 +0200 Subject: Doc & menubar hidden for QtDemo after switching back from fullscreen The problem here was fix for bug QTBUG-8933. In order to fix that bug we added a new call to the SetSystemUIMode(...) system call, but I forgot to update the status inside Qt, so the system didn't know it was in full screen mode. Task-number: QTBUG-9883 Reviewed-by: Prasanth --- src/gui/widgets/qmenu_mac.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index e8400d6..aaa113b 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -2066,6 +2066,7 @@ bool QMenuBarPrivate::macUpdateMenuBarImmediatly() cancelAllMenuTracking(); QWidget *w = findWindowThatShouldDisplayMenubar(); QMenuBar *mb = findMenubarForWindow(w); + extern bool qt_mac_app_fullscreen; //qapplication_mac.mm // We need to see if we are in full screen mode, if so we need to // switch the full screen mode to be able to show or hide the menubar. @@ -2074,12 +2075,14 @@ bool QMenuBarPrivate::macUpdateMenuBarImmediatly() if(w->isFullScreen()) { // Ok, switch to showing the menubar when hovering over it. SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar); + qt_mac_app_fullscreen = true; } } else if(w) { // Removing a menubar if(w->isFullScreen()) { // Ok, switch to not showing the menubar when hovering on it SetSystemUIMode(kUIModeAllHidden, 0); + qt_mac_app_fullscreen = true; } } -- cgit v0.12 From 3f8a97d5ced09f4cc8893772f8e1291a2830a22c Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 27 Apr 2010 16:44:49 +0200 Subject: Crash while dragging on Mac OS X (Cocoa) This happens only if a new drag is started while a drag operation is going on. It seems to be an unsupported operation on Mac. Reviewed-by: Fabien Freling --- src/gui/kernel/qcocoaview_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index dd12f65..4953c48 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -1554,7 +1554,8 @@ Qt::DropAction QDragManager::drag(QDrag *o) qt_button_down = 0; [dndParams.view release]; [image release]; - dragPrivate()->executed_action = Qt::IgnoreAction; + if (dragPrivate()) + dragPrivate()->executed_action = Qt::IgnoreAction; object = 0; Qt::DropAction performedAction(qt_mac_mapNSDragOperation(qMacDnDParams()->performedAction)); // do post drag processing, if required. -- cgit v0.12 From 9fb2faef7f7cf85175f35af32f2ff260d025982b Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 27 Apr 2010 17:59:05 +0200 Subject: Add unit tests for a number of QList methods. Granted, if this breaks, it will be noticed quickly - but it is desirable to catch such problems at test time rather than in production. Merge-request: 575 Reviewed-by: Benjamin Poulain --- tests/auto/qlist/tst_qlist.cpp | 489 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 489 insertions(+) diff --git a/tests/auto/qlist/tst_qlist.cpp b/tests/auto/qlist/tst_qlist.cpp index e2944cc..ba8aefa 100644 --- a/tests/auto/qlist/tst_qlist.cpp +++ b/tests/auto/qlist/tst_qlist.cpp @@ -62,6 +62,33 @@ private slots: void append() const; void prepend() const; void mid() const; + void at() const; + void first() const; + void last() const; + void begin() const; + void end() const; + void contains() const; + void count() const; + void empty() const; + void endsWith() const; + void lastIndexOf() const; + void move() const; + void removeAll() const; + void removeAt() const; + void removeOne() const; + void replace() const; + void startsWith() const; + void swap() const; + void takeAt() const; + void takeFirst() const; + void takeLast() const; + void toSet() const; + void toStdList() const; + void toVector() const; + void value() const; + + void testSTLIterators() const; + void testOperators() const; }; void tst_QList::length() const @@ -173,5 +200,467 @@ void tst_QList::mid() const QList() << "bak" << "buck" << "hello"); } +void tst_QList::at() const +{ + // test at() and make sure it functions correctly with some simple list manipulation. + QList list; + + // create a list + list << "foo" << "bar" << "baz"; + QVERIFY(list.size() == 3); + QCOMPARE(list.at(0), QLatin1String("foo")); + QCOMPARE(list.at(1), QLatin1String("bar")); + QCOMPARE(list.at(2), QLatin1String("baz")); + + // append an item + list << "hello"; + QVERIFY(list.size() == 4); + QCOMPARE(list.at(0), QLatin1String("foo")); + QCOMPARE(list.at(1), QLatin1String("bar")); + QCOMPARE(list.at(2), QLatin1String("baz")); + QCOMPARE(list.at(3), QLatin1String("hello")); + + // remove an item + list.removeAt(1); + QVERIFY(list.size() == 3); + QCOMPARE(list.at(0), QLatin1String("foo")); + QCOMPARE(list.at(1), QLatin1String("baz")); + QCOMPARE(list.at(2), QLatin1String("hello")); +} + +void tst_QList::first() const +{ + QList list; + list << "foo" << "bar"; + + QCOMPARE(list.first(), QLatin1String("foo")); + + // remove an item, make sure it still works + list.pop_front(); + QVERIFY(list.size() == 1); + QCOMPARE(list.first(), QLatin1String("bar")); +} + +void tst_QList::last() const +{ + QList list; + list << "foo" << "bar"; + + QCOMPARE(list.last(), QLatin1String("bar")); + + // remove an item, make sure it still works + list.pop_back(); + QVERIFY(list.size() == 1); + QCOMPARE(list.last(), QLatin1String("foo")); +} + +void tst_QList::begin() const +{ + QList list; + list << "foo" << "bar"; + + QCOMPARE(*list.begin(), QLatin1String("foo")); + + // remove an item, make sure it still works + list.pop_front(); + QVERIFY(list.size() == 1); + QCOMPARE(*list.begin(), QLatin1String("bar")); +} + +void tst_QList::end() const +{ + QList list; + list << "foo" << "bar"; + + QCOMPARE(*--list.end(), QLatin1String("bar")); + + // remove an item, make sure it still works + list.pop_back(); + QVERIFY(list.size() == 1); + QCOMPARE(*--list.end(), QLatin1String("foo")); +} + +void tst_QList::contains() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + QVERIFY(list.contains(QLatin1String("foo")) == true); + QVERIFY(list.contains(QLatin1String("pirates")) != true); + + // add it and make sure it matches + list.append(QLatin1String("ninjas")); + QVERIFY(list.contains(QLatin1String("ninjas")) == true); +} + +void tst_QList::count() const +{ + QList list; + + // starts empty + QVERIFY(list.count() == 0); + + // goes up + list.append(QLatin1String("foo")); + QVERIFY(list.count() == 1); + + // and up + list.append(QLatin1String("bar")); + QVERIFY(list.count() == 2); + + // and down + list.pop_back(); + QVERIFY(list.count() == 1); + + // and empty. :) + list.pop_back(); + QVERIFY(list.count() == 0); +} + +void tst_QList::empty() const +{ + QList list; + + // make sure it starts empty + QVERIFY(list.empty()); + + // and doesn't stay empty + list.append(QLatin1String("foo")); + QVERIFY(!list.empty()); + + // and goes back to being empty + list.pop_back(); + QVERIFY(list.empty()); +} + +void tst_QList::endsWith() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // test it returns correctly in both cases + QVERIFY(list.endsWith(QLatin1String("baz"))); + QVERIFY(!list.endsWith(QLatin1String("bar"))); + + // remove an item and make sure the end item changes + list.pop_back(); + QVERIFY(list.endsWith(QLatin1String("bar"))); +} + +void tst_QList::lastIndexOf() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // one instance of the target item + QVERIFY(list.lastIndexOf(QLatin1String("baz")) == 2); + + // shouldn't find this + QVERIFY(list.lastIndexOf(QLatin1String("shouldntfindme")) == -1); + + // multiple instances + list.append("baz"); + list.append("baz"); + QVERIFY(list.lastIndexOf(QLatin1String("baz")) == 4); + + // search from the middle to find the last one + QVERIFY(list.lastIndexOf(QLatin1String("baz"), 3) == 3); + + // try find none + QVERIFY(list.lastIndexOf(QLatin1String("baz"), 1) == -1); +} + +void tst_QList::move() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // move an item + list.move(0, list.count() - 1); + QCOMPARE(list, QList() << "bar" << "baz" << "foo"); + + // move it back + list.move(list.count() - 1, 0); + QCOMPARE(list, QList() << "foo" << "bar" << "baz"); + + // move an item in the middle + list.move(1, 0); + QCOMPARE(list, QList() << "bar" << "foo" << "baz"); +} + +void tst_QList::removeAll() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // remove one instance + list.removeAll(QLatin1String("bar")); + QCOMPARE(list, QList() << "foo" << "baz"); + + // many instances + list << "foo" << "bar" << "baz"; + list << "foo" << "bar" << "baz"; + list << "foo" << "bar" << "baz"; + list.removeAll(QLatin1String("bar")); + QCOMPARE(list, QList() << "foo" << "baz" << "foo" << "baz" << "foo" << "baz" << "foo" << "baz"); + + // try remove something that doesn't exist + list.removeAll(QLatin1String("you won't remove anything I hope")); + QCOMPARE(list, QList() << "foo" << "baz" << "foo" << "baz" << "foo" << "baz" << "foo" << "baz"); +} + +void tst_QList::removeAt() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // middle + list.removeAt(1); + QCOMPARE(list, QList() << "foo" << "baz"); + + // start + list.removeAt(0); + QCOMPARE(list, QList() << "baz"); + + // final + list.removeAt(0); + QCOMPARE(list, QList()); +} + +void tst_QList::removeOne() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // middle + list.removeOne(QLatin1String("bar")); + QCOMPARE(list, QList() << "foo" << "baz"); + + // start + list.removeOne(QLatin1String("foo")); + QCOMPARE(list, QList() << "baz"); + + // last + list.removeOne(QLatin1String("baz")); + QCOMPARE(list, QList()); + + // make sure it really only removes one :) + list << "foo" << "foo"; + list.removeOne("foo"); + QCOMPARE(list, QList() << "foo"); + + // try remove something that doesn't exist + list.removeOne(QLatin1String("you won't remove anything I hope")); + QCOMPARE(list, QList() << "foo"); +} + +void tst_QList::replace() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // start + list.replace(0, "moo"); + QCOMPARE(list, QList() << "moo" << "bar" << "baz"); + + // middle + list.replace(1, "cow"); + QCOMPARE(list, QList() << "moo" << "cow" << "baz"); + + // end + list.replace(2, "milk"); + QCOMPARE(list, QList() << "moo" << "cow" << "milk"); +} + +void tst_QList::startsWith() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // make sure it starts ok + QVERIFY(list.startsWith(QLatin1String("foo"))); + + // remove an item + list.removeFirst(); + QVERIFY(list.startsWith(QLatin1String("bar"))); +} + +void tst_QList::swap() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // swap + list.swap(0, 2); + QCOMPARE(list, QList() << "baz" << "bar" << "foo"); + + // swap again + list.swap(1, 2); + QCOMPARE(list, QList() << "baz" << "foo" << "bar"); +} + +void tst_QList::takeAt() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + QCOMPARE(list.takeAt(0), QLatin1String("foo")); + QVERIFY(list.size() == 2); + QCOMPARE(list.takeAt(1), QLatin1String("baz")); + QVERIFY(list.size() == 1); + QCOMPARE(list.takeAt(0), QLatin1String("bar")); + QVERIFY(list.size() == 0); +} + +void tst_QList::takeFirst() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + QCOMPARE(list.takeFirst(), QLatin1String("foo")); + QVERIFY(list.size() == 2); + QCOMPARE(list.takeFirst(), QLatin1String("bar")); + QVERIFY(list.size() == 1); + QCOMPARE(list.takeFirst(), QLatin1String("baz")); + QVERIFY(list.size() == 0); +} + +void tst_QList::takeLast() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + QCOMPARE(list.takeLast(), QLatin1String("baz")); + QCOMPARE(list.takeLast(), QLatin1String("bar")); + QCOMPARE(list.takeLast(), QLatin1String("foo")); +} + +void tst_QList::toSet() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // no duplicates + QCOMPARE(list.toSet(), QSet() << "foo" << "bar" << "baz"); + QCOMPARE(list, QList() << "foo" << "bar" << "baz"); + + // duplicates (is this more of a QSet test?) + list << "foo" << "bar" << "baz"; + QCOMPARE(list.toSet(), QSet() << "foo" << "bar" << "baz"); + QCOMPARE(list, QList() << "foo" << "bar" << "baz" << "foo" << "bar" << "baz"); +} + +void tst_QList::toStdList() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // yuck. + std::list slist; + slist.push_back(QLatin1String("foo")); + slist.push_back(QLatin1String("bar")); + slist.push_back(QLatin1String("baz")); + + QCOMPARE(list.toStdList(), slist); + QCOMPARE(list, QList() << "foo" << "bar" << "baz"); +} + +void tst_QList::toVector() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + QCOMPARE(list.toVector(), QVector() << "foo" << "bar" << "baz"); +} + +void tst_QList::value() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + // test real values + QCOMPARE(list.value(0), QLatin1String("foo")); + QCOMPARE(list.value(2), QLatin1String("baz")); + + // test empty default + QCOMPARE(list.value(3), QString()); + QCOMPARE(list.value(-1), QString()); + + // test defaults + QLatin1String defaultstr("default"); + QCOMPARE(list.value(-1, defaultstr), defaultstr); + QCOMPARE(list.value(3, defaultstr), defaultstr); +} + +void tst_QList::testOperators() const +{ + QList list; + list << "foo" << "bar" << "baz"; + + QList listtwo; + listtwo << "foo" << "bar" << "baz"; + + // test equal + QVERIFY(list == listtwo); + + // not equal + listtwo.append("not equal"); + QVERIFY(list != listtwo); + + // += + list += listtwo; + QVERIFY(list.size() == 7); + QVERIFY(listtwo.size() == 4); + QCOMPARE(list, QList() << "foo" << "bar" << "baz" << "foo" << "bar" << "baz" << "not equal"); + + // = + list = listtwo; + QCOMPARE(list, listtwo); + QCOMPARE(list, QList() << "foo" << "bar" << "baz" << "not equal"); + + // [] + QCOMPARE(list[0], QLatin1String("foo")); + QCOMPARE(list[list.size() - 1], QLatin1String("not equal")); +} + +void tst_QList::testSTLIterators() const +{ + QList list; + + // create a list + list << "foo" << "bar" << "baz"; + QList::iterator it = list.begin(); + QCOMPARE(*it, QLatin1String("foo")); it++; + QCOMPARE(*it, QLatin1String("bar")); it++; + QCOMPARE(*it, QLatin1String("baz")); it++; + QCOMPARE(it, list.end()); it--; + + // walk backwards + QCOMPARE(*it, QLatin1String("baz")); it--; + QCOMPARE(*it, QLatin1String("bar")); it--; + QCOMPARE(*it, QLatin1String("foo")); + + // test erase + it = list.erase(it); + QVERIFY(list.size() == 2); + QCOMPARE(*it, QLatin1String("bar")); + + // test multiple erase + it = list.erase(it, it + 2); + QVERIFY(list.size() == 0); + QCOMPARE(it, list.end()); + + // insert again + it = list.insert(it, QLatin1String("foo")); + QVERIFY(list.size() == 1); + QCOMPARE(*it, QLatin1String("foo")); + + // insert again + it = list.insert(it, QLatin1String("bar")); + QVERIFY(list.size() == 2); + QCOMPARE(*it++, QLatin1String("bar")); + QCOMPARE(*it, QLatin1String("foo")); +} + QTEST_APPLESS_MAIN(tst_QList) #include "tst_qlist.moc" -- cgit v0.12 From 7cbcda51b464d79f3a4c29c12743067b5a603502 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 27 Apr 2010 20:04:09 +0200 Subject: Fix the compilation with QT_NO_TOOLTIP Merge-request: 579 Reviewed-by: Benjamin Poulain --- src/gui/graphicsview/qgraphicsproxywidget.cpp | 2 ++ src/plugins/accessible/widgets/simplewidgets.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index 1f89714..320395e 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -975,6 +975,7 @@ bool QGraphicsProxyWidget::eventFilter(QObject *object, QEvent *event) d->styleChangeMode = QGraphicsProxyWidgetPrivate::NoMode; } break; +#ifndef QT_NO_TOOLTIP case QEvent::ToolTipChange: // Propagate tooltip change to the proxy. if (!d->tooltipChangeMode) { @@ -983,6 +984,7 @@ bool QGraphicsProxyWidget::eventFilter(QObject *object, QEvent *event) d->tooltipChangeMode = QGraphicsProxyWidgetPrivate::NoMode; } break; +#endif default: break; } diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp index daa827e..f39d538 100644 --- a/src/plugins/accessible/widgets/simplewidgets.cpp +++ b/src/plugins/accessible/widgets/simplewidgets.cpp @@ -605,7 +605,11 @@ int QAccessibleDisplay::navigate(RelationFlag rel, int entry, QAccessibleInterfa /*! \reimp */ QString QAccessibleDisplay::imageDescription() { +#ifndef QT_NO_TOOLTIP return widget()->toolTip(); +#else + return QString::null; +#endif } /*! \reimp */ -- cgit v0.12 From 2a61c936bab8fb932568338d501d2b360fdb37ea Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 27 Apr 2010 20:05:56 +0200 Subject: Fix compilation with QT_NO_TEXTSTREAM Merge-request: 582 Reviewed-by: Benjamin Poulain --- src/network/access/qftp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index 7f6df0a..97219f4 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -2311,7 +2311,7 @@ void QFtpPrivate::_q_piError(int errorCode, const QString &text) Q_Q(QFtp); if (pending.isEmpty()) { - qWarning() << "QFtpPrivate::_q_piError was called without pending command!"; + qWarning("QFtpPrivate::_q_piError was called without pending command!"); return; } -- cgit v0.12 From 5cda62bc7197f6ea64b59c88351f0b5af14f416e Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 28 Apr 2010 10:50:35 +1000 Subject: Fix compile. --- tools/qdoc3/htmlgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 8e3b38c..f5c304e 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1680,7 +1680,7 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, { Text breadcrumb; if (node->type() == Node::Class) { - ClassNode* cn = static_cast(node); + const ClassNode* cn = static_cast(node); QString name = node->moduleName(); if (!name.isEmpty()) { out() << "
  • "; -- cgit v0.12 From 9f37f96fa715038a6f0164099c001d8c302671d8 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 28 Apr 2010 11:02:18 +1000 Subject: Fix compatibility with Qt Mobility. Applications which are built against Qt 4.7 but choose to use the bearer management module from Qt Mobility do not get to set/get the network configuration used by QNAM. --- src/network/access/qnetworkaccessmanager.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index a0ffb07..95e45f0 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -62,7 +62,7 @@ class QNetworkReply; class QNetworkProxy; class QNetworkProxyFactory; class QSslError; -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) class QNetworkConfiguration; #endif @@ -121,11 +121,13 @@ public: QNetworkReply *deleteResource(const QNetworkRequest &request); QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0); -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) void setConfiguration(const QNetworkConfiguration &config); QNetworkConfiguration configuration() const; QNetworkConfiguration activeConfiguration() const; +#endif +#ifndef QT_NO_BEARERMANAGEMENT void setNetworkAccessible(NetworkAccessibility accessible); NetworkAccessibility networkAccessible() const; #endif @@ -140,9 +142,11 @@ Q_SIGNALS: void sslErrors(QNetworkReply *reply, const QList &errors); #endif -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) void networkSessionConnected(); +#endif +#ifndef QT_NO_BEARERMANAGEMENT void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible); #endif @@ -155,7 +159,7 @@ private: Q_DECLARE_PRIVATE(QNetworkAccessManager) Q_PRIVATE_SLOT(d_func(), void _q_replyFinished()) Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList)) -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed()) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionNewConfigurationActivated()) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool)) -- cgit v0.12 From 2737386ebcb99715d3198a91b5951415c24f99aa Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 28 Apr 2010 08:42:00 +0200 Subject: Update Polish translations --- translations/qt_pl.ts | 320 +++++++++++++++++++++++++------------------------- 1 file changed, 160 insertions(+), 160 deletions(-) diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts index dd8a160..ef5e9a2 100644 --- a/translations/qt_pl.ts +++ b/translations/qt_pl.ts @@ -115,7 +115,7 @@ <html>Switching to the audio playback device <b>%1</b><br/>which has higher preference or is specifically configured for this stream.</html> - + <html>Przełączanie na urządzenie dźwiękowe <b>%1</b><br/>które ma wyższy priorytet lub jest specjalnie skonfigurowane dla tego strumienia.</html> @@ -441,7 +441,7 @@ zainstalowałeś libgstreamer-plugins-base. Video display error - Błąd wyświetlacza wideo + Błąd wyświetlacza wideo @@ -542,7 +542,7 @@ zainstalowałeś libgstreamer-plugins-base. Video display error - Błąd wyświetlacza wideo + Błąd wyświetlacza wideo @@ -1600,17 +1600,17 @@ na Cannot animate non-existent property "%1" - + Nie można animować nieistniejącej właściwości "%1" Cannot animate read-only property "%1" - + Nie można animować właściwości (tylko do odczytu): "%1" Animation is an abstract class - + "Animation" jest klasą abstrakcyjną @@ -1618,7 +1618,7 @@ na Cannot set a duration of < 0 - + Nie można ustawić ujemnego czasu trwania @@ -1626,12 +1626,12 @@ na Possible anchor loop detected on fill. - + Wykryto możliwe zapętlenie dla kotwicy "fill". Possible anchor loop detected on centerIn. - + Wykryto możliwe zapętlenie dla kotwicy "centerIn". @@ -1639,54 +1639,54 @@ na Cannot anchor to an item that isn't a parent or sibling. - + Nie można doczepić kotwicy do elementu który nie jest rodzicem ani rodzeństwem. Possible anchor loop detected on vertical anchor. - + Wykryto możliwe zapętlenie dla pionowej kotwicy. Possible anchor loop detected on horizontal anchor. - + Wykryto możliwe zapętlenie dla poziomej kotwicy. Cannot specify left, right, and hcenter anchors. - + Nie można jednocześnie podać lewej, prawej i centralnej poziomej kotwicy. Cannot anchor to a null item. - + Nie można doczepić kotwicy do zerowego elementu. Cannot anchor a horizontal edge to a vertical edge. - + Nie można doczepić poziomej krawędzi do pionowej. Cannot anchor item to self. - + Nie można doczepić kotwicy do tego samego elementu. Cannot specify top, bottom, and vcenter anchors. - + Nie można jednocześnie podać górnej, dolnej i centralnej pionowej kotwicy. Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors. - + Bazowa kotwica nie może być użyta w połączeniu z górną, dolną lub centralną pionową kotwicą. Cannot anchor a vertical edge to a horizontal edge. - + Nie można doczepić pionowej krawędzi do poziomej. @@ -1694,7 +1694,7 @@ na Qt was built without support for QMovie - + Qt zostało zbudowane bez obsługi QMovie @@ -1702,7 +1702,7 @@ na Cannot change the animation assigned to a Behavior. - + Nie można zmienić animacji przypisanej do "Zachowania". @@ -1710,7 +1710,7 @@ na Binding loop detected for property "%1" - + Zapętlenie powiązania dla właściwości "%1" @@ -1718,7 +1718,7 @@ na Binding loop detected for property "%1" - + Zapętlenie powiązania dla właściwości "%1" @@ -1731,92 +1731,92 @@ na Invalid property assignment: "%1" is a read-only property - + Niepoprawne przypisanie wartości: "%1" jest właściwością tylko do odczytu Invalid property assignment: unknown enumeration - + Niepoprawne przypisanie wartości: nieznana wartość wyliczeniowa Invalid property assignment: string expected - + Niepoprawne przypisanie wartości: oczekiwano ciągu Invalid property assignment: url expected - + Niepoprawne przypisanie wartości: oczekiwano url Invalid property assignment: unsigned int expected - + Niepoprawne przypisanie wartości: oczekiwano liczby naturalnej Invalid property assignment: int expected - + Niepoprawne przypisanie wartości: oczekiwano liczby całkowitej Invalid property assignment: float expected - + Niepoprawne przypisanie wartości: oczekiwano liczby zmiennoprzecinkowej Invalid property assignment: double expected - + Niepoprawne przypisanie wartości: oczekiwano liczby zmiennoprzecinkowej podwójnej precyzji Invalid property assignment: color expected - + Niepoprawne przypisanie wartości: oczekiwano koloru Invalid property assignment: date expected - + Niepoprawne przypisanie wartości: oczekiwano daty Invalid property assignment: time expected - + Niepoprawne przypisanie wartości: oczekiwano czasu Invalid property assignment: datetime expected - + Niepoprawne przypisanie wartości: oczekiwano daty i czasu Invalid property assignment: point expected - + Niepoprawne przypisanie wartości: oczekiwano punktu Invalid property assignment: size expected - + Niepoprawne przypisanie wartości: oczekiwano rozmiaru Invalid property assignment: rect expected - + Niepoprawne przypisanie wartości: oczekiwano prostokąta Invalid property assignment: boolean expected - + Niepoprawne przypisanie wartości: oczekiwano wartości boolowskiej Invalid property assignment: 3D vector expected - + Niepoprawne przypisanie wartości: oczekiwano wektoru 3D Invalid property assignment: unsupported type "%1" - + Niepoprawne przypisanie wartości: nieobsługiwany typ "%1" @@ -1831,13 +1831,13 @@ na Invalid component id specification - + Niepoprawna specyfikacja "id" componentu id is not unique - + Wartość "id" nie jest unikatowa @@ -1910,7 +1910,7 @@ na Invalid use of namespace - + Niepoprawne użycie przestrzeni nazw @@ -1920,7 +1920,7 @@ na Invalid use of id property - + Niepoprawne użycie właściwości "id" @@ -1942,27 +1942,27 @@ na Invalid property use - + Niepoprawne użycie właściwości Property assignment expected - + Oczekiwano przypisania wartości Single property assignment expected - + Oczekiwano przypisania pojedynczej wartości Unexpected object assignment - + Nieoczekiwane przypisanie obiektu Cannot assign object to list - + Nie można przypisać obiektu do listy @@ -1987,7 +1987,7 @@ na Cannot assign object to property - + Nie można przypisać obiektu dla właściwości @@ -1997,77 +1997,77 @@ na Duplicate default property - + Powielona domyślna właściwość Duplicate property name - + Powielona nazwa właściwości Property names cannot begin with an upper case letter - + Nazwy właściwości nie mogą rozpoczynać się wielką literą Duplicate signal name - + Powielona nazwa sygnału Signal names cannot begin with an upper case letter - + Nazwy sygnałów nie mogą rozpoczynać się wielką literą Duplicate method name - + Powielona nazwa medoty Method names cannot begin with an upper case letter - + Nazwy metod nie mogą rozpoczynać się wielką literą Property value set multiple times - + Wartość właściwości ustawiona wielokrotnie Invalid property nesting - + Niepoprawne zagnieżdżenie właściwości Cannot override FINAL property - + Nie można nadpisać właściwości "FINAL" Invalid property type - + Niepoprawny typ właściwości Invalid empty ID - + Niepoprawny pusty identyfikator IDs cannot start with an uppercase letter - + Identyfikatory nie mogą rozpoczynać się wielką literą IDs must start with a letter or underscore - + Identyfikatory muszą rozpoczynać się literą lub znakiem podkreślenia IDs must contain only letters, numbers, and underscores - + Identyfikatory mogą zawierać jedynie litery, cyfry i znaki podkreślenia @@ -2102,7 +2102,7 @@ na Invalid empty URL - + Niepoprawny pusty URL @@ -2111,22 +2111,22 @@ na Resource %1 unavailable - + Zasób %1 nie jest dostępny Namespace %1 cannot be used as a type - + Przestrzeń nazw %1 nie może być użyta jako typ %1 is not a type - + %1 nie jest typem Type %1 unavailable - + Typ %1 nie jest dostępny @@ -2136,22 +2136,22 @@ na Cannot assign to non-existent property "%1" - + Nie można przypisać wartości do nieistniejącej właściwości "%1" Connections: nested objects not allowed - + Połączenia: zagnieżdżone obiekty nie są dozwolone Connections: syntax error - + Połączenia: błąd składni Connections: script expected - + Połączenia: oczekiwano skryptu @@ -2159,34 +2159,34 @@ na module "%1" definition "%2" not readable - + definicja "%2" modułu "%1" nie może zostać odczytana plugin cannot be loaded for module "%1": %2 - + wtyczka nie może zostać załadowana dla modułu "%1": %2 module "%1" plugin "%2" not found - + wtyczka "%2" modułu "%1" nie została odnaleziona module "%1" version %2.%3 is not installed - + wersja %2.%3 modułu %1 nie jest zainstalowana module "%1" is not installed - + moduł "%1" nie jest zainstalowany "%1": no such directory - + "%1": brak katalogu @@ -2196,22 +2196,22 @@ na executeSql called outside transaction() - + "executeSql" zawołane na zewnątrz "transation()" Read-only Transaction - + Transakcja tylko do odczytu Version mismatch: expected %1, found %2 - + Niezgodność wersji: oczekiwano %1, znaleziono %2 SQL transaction failed - + Transakcja SQL zakończona błędem @@ -2230,12 +2230,12 @@ na front is a write-once property - + "front" jest właściwością tylko do odczytu back is a write-once property - + "back" jest właściwością tylko do odczytu @@ -2243,7 +2243,7 @@ na KeyNavigation is only available via attached properties - + "KeyNavigation" jest dostępny jedynie poprzez właściwości dołączone @@ -2251,7 +2251,7 @@ na Keys is only available via attached properties - + "Keys" jest dostępny jedynie poprzez właściwości dołączone @@ -2259,64 +2259,64 @@ na remove: index %1 out of range - + remove: indeks %1 poza zakresem insert: value is not an object - + insert: wartość nie jest obiektem insert: index %1 out of range - + insert: indeks %1 poza zakresem move: out of range - + move: poza zakresem append: value is not an object - + append: wartość nie jest obiektem get: index %1 out of range - + get: indeks %1 poza zakresem set: value is not an object - + set: wartość nie jest obiektem set: index %1 out of range - + set: indeks %1 poza zakresem ListElement: cannot contain nested elements - + ListElement: nie może zawierać zagnieżdżonych elementów ListElement: cannot use reserved "id" property - + ListElement: nie można używać zarezerwowanej właściwości "id" ListElement: cannot use script for property value - + ListElement: nie można używać skryptu jako wartości właściwości ListModel: undefined property '%1' - + ListModel: niezdefiniowana właściwość "%1" @@ -2377,12 +2377,12 @@ na Illegal character - + Niepoprawny znak Unclosed string at end of line - + Niedomknięty ciąg na końcu linii @@ -2392,7 +2392,7 @@ na Unclosed comment at end of file - + Niedomknięty komentarz na końcu linii @@ -2434,25 +2434,25 @@ na Unexpected token `%1' - + Nieoczekiwany znak "%1" Expected token `%1' - + Oczekiwano znaku "%1" Property value set multiple times - + Wartość właściwości ustawiona wielokrotnie Expected type name - + Oczekiwano nazwy typu @@ -2510,7 +2510,7 @@ na Cannot set a duration of < 0 - + Nie można ustawić ujemnego czasu trwania @@ -2518,23 +2518,23 @@ na Error decoding: %1: %2 - + Błąd dekodowania: %1: %2 Failed to get image from provider: %1 - + Pobieranie obrazka od dostawcy zakończone błędem: %1 Cannot open: %1 - + Nie można otworzyć: %1 Unknown Error loading %1 - + Nieznany błąd ładowania %1 @@ -2542,7 +2542,7 @@ na Cannot set a duration of < 0 - + Nie można ustawić ujemnego czasu trwania @@ -2550,17 +2550,17 @@ na PropertyChanges does not support creating state-specific objects. - + "PropertyChanges" nie obsługuje tworzenia obiektów charakterystycznych dla stanów. Cannot assign to non-existent property "%1" - + Nie można przypisać wartości do nieistniejącej właściwości "%1" Cannot assign to read-only property "%1" - + Nie można przypisać wartości do właściwości (tylko do odczytu): "%1" @@ -2582,22 +2582,22 @@ na Unable to create object of type %1 - + Nie można utworzyć obiektu typu %1 Cannot assign value %1 to property %2 - + Nie można przypisać wartości %1 do właściwości %2 Cannot assign object type %1 with no default method - + Nie można przypisać obiektu typu %1 który nie posiada domyślnej metody Cannot connect mismatched signal/slot %1 %vs. %2 - + Nie można podłączyć niepasujących sygnałów / slotów (%1 i %2) @@ -2607,7 +2607,7 @@ na Cannot assign object to list - + Nie można przypisać obiektu do listy @@ -2617,7 +2617,7 @@ na Unable to create attached object - + Nie można utworzyć dołączonego obiektu @@ -2639,7 +2639,7 @@ na Qt was built without support for xmlpatterns - + Qt zostało zbudowane bez obsługi xmlpatterns @@ -2647,7 +2647,7 @@ na An XmlRole query must not start with '/' - + Zapytanie XmlRole nie może rozpoczynać się od "/" @@ -2655,7 +2655,7 @@ na An XmlListModel query must start with '/' or "//" - + Zapytanie XmlListModel nie może rozpoczynać się od "/" ani od "//" @@ -3185,32 +3185,32 @@ Proszę o sprawdzenie podanej nazwy pliku. Go back - + Wróć Go forward - + Przejdź dalej Go to the parent directory - + Przejdź do katalogu wyżej Create a New Folder - + Utwórz nowy katalog Change to list view mode - + Pokaż listę Change to detail view mode - + Pokaż szczegóły @@ -3721,7 +3721,7 @@ Proszę o sprawdzenie podanej nazwy pliku. Unable to play %1 - + Nie można odtworzyć %1 @@ -4564,23 +4564,23 @@ Proszę o sprawdzenie podanej nazwy pliku. Could not add items to read only playlist. - + Nie można dodać elementów do listy odtwarzania (tylko do odczytu). Playlist format is not supported - + Format listy odtwarzania nie jest obsługiwany The file could not be accessed. - + Brak dostępu do pliku. Playlist format is not supported. - + Format listy odtwarzania nie jest obsługiwany. @@ -4821,12 +4821,12 @@ Proszę o sprawdzenie podanej nazwy pliku. Operation not supported on %1 - Operacja nieobsługiwana na %1 + Operacja nieobsługiwana na %1 Invalid URI: %1 - Niepoprawny URI: %1 + Niepoprawny URI: %1 @@ -4839,12 +4839,12 @@ Proszę o sprawdzenie podanej nazwy pliku. Socket error on %1: %2 - Błąd gniazda na %1: %2 + Błąd gniazda na %1: %2 Remote host closed the connection prematurely on %1 - Zdalny host przedwcześnie zakończył połączenie na %1 + Zdalny host przedwcześnie zakończył połączenie na %1 @@ -4919,7 +4919,7 @@ Proszę o sprawdzenie podanej nazwy pliku. Network access is disabled. - + Dostęp do sieci wyłączony. @@ -4942,7 +4942,7 @@ Proszę o sprawdzenie podanej nazwy pliku. Temporary network failure. - + Chwilowy błąd w sieci. @@ -4959,7 +4959,7 @@ Proszę o sprawdzenie podanej nazwy pliku. Invalid configuration. - + Niepoprawna konfiguracja. @@ -4972,7 +4972,7 @@ Proszę o sprawdzenie podanej nazwy pliku. Session aborted by user or system - + Sesja przerwana przez użytkownika lub system @@ -4989,25 +4989,25 @@ Proszę o sprawdzenie podanej nazwy pliku. The session was aborted by the user or system. - + Sesja została przerwana przez użytkownika lub system. The requested operation is not supported by the system. - + Zażądana operacja nie jest obsługiwana przez system. The specified configuration cannot be used. - + Podana konfiguracja nie może być użyta. Roaming was aborted or is not possible. - + Roaming przerwany albo niemożliwy. @@ -5413,7 +5413,7 @@ Proszę o sprawdzenie podanej nazwy pliku. Print current page - + Wydrukuj bieżącą stronę @@ -6019,7 +6019,7 @@ Proszę wybrać inną nazwę pliku. Current Page - + Bieżąca strona @@ -8663,7 +8663,7 @@ Proszę wybrać inną nazwę pliku. Go Forward Forward context menu item - Idź dalej + Przejdź dalej @@ -8819,7 +8819,7 @@ Proszę wybrać inną nazwę pliku. Missing Plug-in Label text to be used when a plug-in is missing - + Brakująca wtyczka @@ -11944,32 +11944,32 @@ Proszę wybrać inną nazwę pliku. Duration content does not match the maxInclusive facet. - Wartość długości okresu czasu koliduje z aspektem "maxInclusive". + Wartość czasu trwania koliduje z aspektem "maxInclusive". Duration content does not match the maxExclusive facet. - Wartość długości okresu czasu koliduje z aspektem "maxExclusive". + Wartość czasu trwania koliduje z aspektem "maxExclusive". Duration content does not match the minInclusive facet. - Wartość długości okresu czasu koliduje z aspektem "minInclusive". + Wartość czasu trwania koliduje z aspektem "minInclusive". Duration content does not match the minExclusive facet. - Wartość długości okresu czasu koliduje z aspektem "minExclusive". + Wartość czasu trwania koliduje z aspektem "minExclusive". Duration content is not listed in the enumeration facet. - Wartość długości okresu czasu nie widnieje na liście aspektu "enumeration". + Wartość czasu trwania nie widnieje na liście aspektu "enumeration". Duration content does not match pattern facet. - Wartość długości okresu czasu koliduje z aspektem "pattern". + Wartość czasu trwania koliduje z aspektem "pattern". @@ -12280,7 +12280,7 @@ Proszę wybrać inną nazwę pliku. about:blank - + o:puste -- cgit v0.12 From 00ebbeb5c319957d5671130313da3c5485e0f31c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 28 Apr 2010 10:13:10 +0200 Subject: qdoc: Fixed const-ness. --- tools/qdoc3/htmlgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 8e3b38c..f5c304e 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1680,7 +1680,7 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, { Text breadcrumb; if (node->type() == Node::Class) { - ClassNode* cn = static_cast(node); + const ClassNode* cn = static_cast(node); QString name = node->moduleName(); if (!name.isEmpty()) { out() << "
  • "; -- cgit v0.12