diff --git a/share/qtcreator/welcomescreen/examples_fallback.xml b/share/qtcreator/welcomescreen/examples_fallback.xml
deleted file mode 100644
index 8c23b56892c..00000000000
--- a/share/qtcreator/welcomescreen/examples_fallback.xml
+++ /dev/null
@@ -1,860 +0,0 @@
-
-
-
-
-
- demo,declarative,samegame,qml,qt quick
-
-
-
- demo,declarative,flickr,qml,qt quick
-
-
-
- demo,affine
-
-
-
- demo,composition
-
-
-
- demo,gradients
-
-
-
- demo,pathstroke
-
-
-
- demo,textedit
-
-
-
- demo,chip
-
-
-
- demo,embeddeddialogs
-
-
-
- demo,interview
-
-
-
- demo,declarative,rssnews,qml,qt quick
-
-
-
- demo,declarative,twitter,qml,qt quick
-
-
-
- demo,browser
-
-
- Phonon can be used in Qt applications to handle audio and video playback.]]>
- demo,qmediaplayer,phonon
-
-
- Graphics View Framework.]]>
- demo,boxes,graphics view framework
-
-
- the animation framework and the state machine framework to create a game.]]>
- demo,sub-attaq,the animation framework,the state machine framework
-
-
- QtMultimedia Module can be used in Qt applications to capture and then play back an audio stream.]]>
- demo,spectrum,qtmultimedia module
-
-
-
- demo,declarative,minehunt
-
-
- QPainterPath.]]>
- demo,deform,qpainterpath
-
-
-
- demo,books
-
-
-
- demo,mainwindow
-
-
-
- demo,spreadsheet
-
-
-
- demo,sqlbrowser
-
-
- Qt Designer's custom widget plugin facilities.]]>
- demo,arthurplugin
-
-
-
-
-
- example,animatedtiles,animation
-
-
-
- example,appchooser,animation
-
-
-
- example,easing,animation
-
-
- QGraphicsScene using a QStateMachine with a custom transition.]]>
- example,moveblocks,animation,qgraphicsscene,qstatemachine
-
-
-
- example,states,animation
-
-
-
- example,stickman,animation
-
-
- QtConcurrent Map example shows how to use the synchronous (blocking) QtConcurrent API to scale a collection of images.]]>
- example,map,qtconcurrent,qtconcurrent,qtconcurrent
-
-
- QtConcurrent Progress Dialog example shows how to use the QFutureWatcher class to monitor the progress of a long-running operation.]]>
- example,progressdialog,qtconcurrent,qtconcurrent,qfuturewatcher
-
-
- QtConcurrent Run Function example shows how to apply concurrency to a standard function, using QFuture instances to retrieve return values at a later time.]]>
- example,runfunction,qtconcurrent,qtconcurrent,qfuture
-
-
- QtConcurrent Word Count example demonstrates the use of the map-reduce algorithm when applied to the problem of counting words in a collection of files.]]>
- example,wordcount,qtconcurrent,qtconcurrent
-
-
- Dynamic Object Creation support to dynamically create and destroy objects.]]>
- example,dynamicscene,declarative,toys,qml,qt quick,dynamic object creation
-
-
-
- example,tic-tac-toe,declarative,toys,qml,qt quick
-
-
- Image elements with Rotation transforms and SpringAnimation behaviors.]]>
- example,clocks,declarative,toys,qml,qt quick,image,rotation,springanimation
-
-
- ListModel, Repeater and TextEdit together with rotation and scaling transforms, animation and mouse interaction.]]>
- example,corkboards,declarative,toys,qml,qt quick,listmodel,repeater,textedit
-
-
- SpringAnimation, SequentialAnimation and PropertyAction to create a game of TV tennis.]]>
- example,tvtennis,declarative,toys,qml,qt quick,springanimation,sequentialanimation,propertyaction
-
-
- Qt Designer form at run-time, using the QUiLoader class.]]>
- example,calculatorbuilder,designer,quiloader
-
-
- Qt Designer in an application by using the user interface information from a QWidget subclass. We use uic's auto-connection feature to automatically connect signals from widgets on the form to slots in our code.]]>
- example,calculatorform,designer,qwidget,uic's auto-connection
-
-
- QDesignerContainerExtension class.]]>
- example,containerextension,designer,qdesignercontainerextension
-
-
- Qt Designer.]]>
- example,customwidgetplugin,designer
-
-
- Qt Designer, and how to to use the QDesignerTaskMenuExtension class to provide custom task menu entries associated with the plugin.]]>
- example,taskmenuextension,designer,<i>qt designer</i>,qdesignertaskmenuextension
-
-
-
- example,worldtimeclockbuilder,designer
-
-
- Qt Designer that uses signals and slots.]]>
- example,worldtimeclockplugin,designer
-
-
-
- example,systray,desktop
-
-
- QApplication and QDesktopWidget. It also shows how to use QTimer to provide a single-shot timer, and how to reimplement the QWidget::resizeEvent() event handler to make sure that an application resizes smoothly and without data loss.]]>
- example,screenshot,desktop,qapplication,qdesktopwidget,qtimer,qwidget::resizeevent
-
-
-
- example,configdialog,dialogs
-
-
- QDialog using the QAbstractButton::toggled() signal and the QWidget::setVisible() slot.]]>
- example,extension,dialogs,qdialog,qabstractbutton::toggled,qwidget::setvisible
-
-
- QProgressDialog to provide feedback on the progress of a slow operation. The example also shows how to use QFileDialog to facilitate browsing, how to use QTextStream's streaming operators to read a file, and how to use QTableWidget to provide standard table display facilities for applications. In addition, files can be opened using the QDesktopServices class.]]>
- example,findfiles,dialogs,qprogressdialog,qfiledialog,qtextstream,qtablewidget,qdesktopservices
-
-
-
- example,standarddialogs,dialogs
-
-
- QTabWidget class.]]>
- example,tabdialog,dialogs,qtabwidget
-
-
- QWizardPage and one instance of QWizard.]]>
- example,trivialwizard,dialogs,qwizardpage,qwizard
-
-
-
- example,licensewizard,dialogs
-
-
- QWizard.]]>
- example,classwizard,dialogs,qwizard
-
-
-
- example,draggableicons,draganddrop
-
-
-
- example,draggabletext,draganddrop
-
-
-
- example,dropsite,draganddrop
-
-
-
- example,fridgemagnets,draganddrop
-
-
-
- example,puzzle,draganddrop
-
-
- GraphicsView example shows how to implement edges between nodes in a graph, with basic interaction. You can click to drag a node around, and zoom in and out using the mouse wheel or the keyboard. Hitting the space bar will randomize the nodes. The example is also resolution independent; as you zoom in, the graphics remain crisp.]]>
- example,elasticnodes,graphicsview,graphicsview
-
-
-
- example,collidingmice,graphicsview
-
-
-
- example,diagramscene,graphicsview
-
-
- GraphicsView example shows how to implement Drag and Drop in a QGraphicsItem subclass, as well as how to animate items using Qt's Animation Framework.]]>
- example,dragdroprobot,graphicsview,graphicsview,qgraphicsitem,animation framework
-
-
- GraphicsView example is a port of the old QCanvas example from Qt 3.]]>
- example,portedcanvas,graphicsview,graphicsview,qcanvas
-
-
- GraphicsView example is a port of the Asteroids game, which was based on QCanvas.]]>
- example,portedasteroids,graphicsview,graphicsview,qcanvas
-
-
- State Machine Framework to create a simple but useful, dynamic, animated user interface.]]>
- example,padnavigator,graphicsview,state machine framework
-
-
- QSharedMemory class to implement inter-process communication using shared memory. To build the example, run make. To run the example, start two instances of the executable. The main() function creates an application and an instance of our example's Dialog class. The dialog is displayed and then control is passed to the application in the standard way.]]>
- example,sharedmemory,ipc,qsharedmemory,application
-
-
- QLocalSocket. It is intended to be run alongside the Local Fortune Server example.]]>
- example,localfortuneclient,ipc,qlocalsocket,local fortune server
-
-
- Local Fortune Client example]]>
- example,localfortuneserver,ipc,local fortune client
-
-
-
- example,addressbook,itemviews
-
-
- QSortFilterProxyModel to perform basic sorting and filtering.]]>
- example,basicsortfiltermodel,itemviews,qsortfilterproxymodel
-
-
-
- example,chart,itemviews
-
-
- QSortFilterProxyModel to perform advanced sorting and filtering.]]>
- example,customsortfiltermodel,itemviews,qsortfilterproxymodel
-
-
- QItemDelegate.]]>
- example,coloreditorfactory,itemviews,qitemdelegate
-
-
-
- example,combowidgetmapper,itemviews
-
-
- QDirModel(obsolete) class to provide supply file and directory information.]]>
- example,dirview,itemviews,qdirmodel(obsolete)
-
-
-
- example,fetchmore,itemviews
-
-
- QTableView.]]>
- example,frozencolumn,itemviews,qtableview
-
-
-
- example,pixelator,itemviews
-
-
-
- example,puzzle,itemviews
-
-
-
- example,simpledommodel,itemviews
-
-
- Model/View Programming overview.]]>
- example,simpletreemodel,itemviews,model/view programming
-
-
-
- example,simplewidgetmapper,itemviews
-
-
-
- example,spinboxdelegate,itemviews
-
-
-
- example,stardelegate,itemviews
-
-
- QBoxLayout, QGridLayout and QFormLayout.]]>
- example,basiclayouts,layouts,qboxlayout,qgridlayout,qformlayout
-
-
-
- example,borderlayout,layouts
-
-
-
- example,dynamiclayouts,layouts
-
-
-
- example,flowlayout,layouts
-
-
- Qt Linguist concept: "contexts". It also shows how to use two or more languages.]]>
- example,arrowpad,linguist
-
-
-
- example,hellotr,linguist
-
-
-
- example,trollprint,linguist
-
-
- QPlainTextEdit.]]>
- example,application,mainwindows,qplaintextedit
-
-
-
- example,dockwidgets,mainwindows
-
-
- QMdiArea class.]]>
- example,mdi,mainwindows,qmdiarea
-
-
-
- example,sdi,mainwindows
-
-
-
- example,menus,mainwindows
-
-
-
- example,recentfiles,mainwindows
-
-
- declarative/ui-components/dialcontrol/dialcontrol.qml
- Image elements with Rotation transforms and SpringAnimation behaviors to produce an interactive speedometer-type dial.]]>
- example,dialcontrol,declarative,ui-components,qml,qt quick,image,rotation,springanimation
-
-
- declarative/ui-components/flipable/flipable.qml
- Flipable element.]]>
- example,flipable,declarative,ui-components,qml,qt quick,flipable
-
-
-
- example,progressbar,declarative,ui-components,qml,qt quick
-
-
- Flickable element using the Flickable::visibleArea properties.]]>
- example,scrollbar,declarative,ui-components,qml,qt quick,flickable,flickable::visiblearea
-
-
- TextInput, FocusScope and BorderImage elements to display multiple text input fields.]]>
- example,searchbox,declarative,ui-components,qml,qt quick,textinput,focusscope,borderimage
-
-
-
- example,slideswitch,declarative,ui-components,qml,qt quick
-
-
- PathView element.]]>
- example,spinner,declarative,ui-components,qml,qt quick,pathview
-
-
- property aliases and default properties can be used to collect and assemble the child items declared within an Item.]]>
- example,tabwidget,declarative,ui-components,qml,qt quick,property aliases,default properties,item
-
-
- QTcpSocket's synchronous API in a non-GUI thread.]]>
- example,blockingfortuneclient,network,qtcpsocket
-
-
-
- example,broadcastreceiver,network
-
-
-
- example,broadcastsender,network
-
-
- QUdpSocket and QNetworkInterface to discover its peers.]]>
- example,network-chat,network,qudpsocket,qnetworkinterface
-
-
- QTcpSocket. It is intended to be run alongside the Fortune Server example or the Threaded Fortune Server example.]]>
- example,fortuneclient,network,qtcpsocket,fortune server,threaded fortune server
-
-
- Fortune Client example or the Blocking Fortune Client example.]]>
- example,fortuneserver,network,fortune client,blocking fortune client
-
-
-
- example,qftp,network
-
-
-
- example,http,network
-
-
-
- example,loopback,network
-
-
-
- example,threadedfortuneserver,network
-
-
-
- example,torrent,network
-
-
- QSslSocket to communicate over an encrypted (SSL) connection. It also demonstrates how to deal with authenticity problems, and how to display security and certificate information.]]>
- example,securesocketclient,network,qsslsocket
-
-
- QNetworkAccessManager class to obtain a list of suggestions from the Google search engine as the user types into a QLineEdit.]]>
- example,googlesuggest,network,qnetworkaccessmanager,qlineedit
-
-
- QPainter and QGLWidget can be used together to display accelerated 2D graphics on supported hardware.]]>
- example,2dpainting,opengl,qpainter,qglwidget
-
-
- QGLFramebufferObject class to render into an off-screen buffer and use the contents as a texture in a QGLWidget.]]>
- example,framebufferobject,opengl,qglframebufferobject,qglwidget
-
-
- QGLFramebufferObject class to render into an off-screen buffer and use the contents as a texture in a QGLWidget.]]>
- example,framebufferobject2,opengl,qglframebufferobject,qglwidget
-
-
-
- example,grabber,opengl
-
-
-
- example,hellogl,opengl
-
-
- QPainter can be used to overpaint a scene rendered using OpenGL in a QGLWidget.]]>
- example,overpainting,opengl,qpainter,qglwidget
-
-
- QGLPixelBuffer class to render into an off-screen buffer and use the contents as a dynamic texture in a QGLWidget.]]>
- example,pbuffers,opengl,qglpixelbuffer,qglwidget
-
-
- QGLPixelBuffer class to render into an off-screen buffer and use the contents as a dynamic texture in a QGLWidget.]]>
- example,pbuffers2,opengl,qglpixelbuffer,qglwidget
-
-
- QGLWidget.]]>
- example,samplebuffers,opengl,qglwidget
-
-
-
- example,textures,opengl
-
-
- QPainter class.]]>
- example,basicdrawing,painting,qpainter
-
-
-
- example,concentriccircles,painting
-
-
-
- example,fontsampler,painting
-
-
- QPainter, described in detail in Composition Modes.]]>
- example,imagecomposition,painting,qpainter,composition modes
-
-
-
- example,painterpaths,painting
-
-
-
- example,svggenerator,painting
-
-
-
- example,svgviewer,painting
-
-
- QPainter renders graphics primitives. In particular it shows how the order of transformations affect the result.]]>
- example,transformations,painting,qpainter
-
-
-
- example,qmusicplayer,phonon
-
-
- QAudioDeviceInfo class provided with Qt.]]>
- example,audiodevices,multimedia,qaudiodeviceinfo
-
-
- QAudioOutput class provided with Qt.]]>
- example,audiooutput,multimedia,qaudiooutput
-
-
- QAudioInput class provided with Qt.]]>
- example,audioinput,multimedia,qaudioinput
-
-
-
- example,calendar,richtext
-
-
- DetailsDialog object and displayed on a QTextEdit with a QTextCursor, using various formats. Each form generated is added to a QTabWidget for easy access.]]>
- example,orderform,richtext,detailsdialog,qtextedit,qtextcursor,qtabwidget
-
-
- QSyntaxHighlighter class.]]>
- example,syntaxhighlighter,richtext,qsyntaxhighlighter
-
-
- QTextDocument.]]>
- example,textobject,richtext,qtextdocument
-
-
- QtScript example, we show how to implement the functionality of a calculator widget.]]>
- example,calculator,script,qtscript
-
-
-
- example,context2d,script
-
-
- QObject-based type scriptable.]]>
- example,defaultprototypes,script,qobject
-
-
-
- example,helloscript,script
-
-
-
- example,qstetrix,script
-
-
-
- example,cachedtable,sql
-
-
- QSqlRelationalTableModel and QDataWidgetMapper classes.]]>
- example,drilldown,sql,qsqlrelationaltablemodel,qdatawidgetmapper
-
-
-
- example,querymodel,sql
-
-
-
- example,relationaltablemodel,sql
-
-
-
- example,tablemodel,sql
-
-
-
- example,masterdetail,sql
-
-
-
- example,sqlwidgetmapper,sql
-
-
- The State Machine Framework.]]>
- example,eventtransitions,statemachine,the state machine framework
-
-
-
- example,rogue,statemachine
-
-
- The State Machine Framework to implement the control flow of a traffic light.]]>
- example,trafficlight,statemachine,the state machine framework
-
-
- The State Machine Framework to implement a simple state machine that toggles the current state when a button is clicked.]]>
- example,twowaybutton,statemachine,the state machine framework
-
-
-
- example,mandelbrot,threads
-
-
-
- example,codecs,tools
-
-
-
- example,completer,tools
-
-
- TextEdit using QTextCursor.]]>
- example,customcompleter,tools,textedit,qtextcursor
-
-
-
- example,i18n,tools
-
-
-
- example,inputpanel,tools
-
-
-
- example,plugandpaint,tools
-
-
-
- example,regexp,tools
-
-
-
- example,settingseditor,tools
-
-
-
- example,treemodelcompleter,tools
-
-
-
- example,undoframework,tools
-
-
-
- example,analogclock,widgets
-
-
- QGridLayout to place child widgets in a grid.]]>
- example,calculator,widgets,qgridlayout
-
-
- QCalendarWidget.]]>
- example,calendarwidget,widgets,qcalendarwidget
-
-
-
- example,charactermap,widgets
-
-
-
- example,codeeditor,widgets
-
-
- QLCDNumber to display a number with LCD-like digits.]]>
- example,digitalclock,widgets,qlcdnumber
-
-
-
- example,groupbox,widgets
-
-
- QIcon can generate pixmaps reflecting an icon's state, mode and size. These pixmaps are generated from the set of pixmaps made available to the icon, and are used by Qt widgets to show an icon representing a particular action.]]>
- example,icons,widgets,qicon
-
-
- QLabel and QScrollArea to display an image. QLabel is typically used for displaying text, but it can also display an image. QScrollArea provides a scrolling view around another widget. If the child widget exceeds the size of the frame, QScrollArea automatically provides scroll bars.]]>
- example,imageviewer,widgets,qlabel,qscrollarea,qlabel,qscrollarea,qscrollarea
-
-
- QLineEdit can be used, and shows the effects of various properties and validators on the input and output supplied by the user.]]>
- example,lineedits,widgets,qlineedit
-
-
- QMovie and QLabel to display animations. Now that Qt comes with the Phonon multimedia framework, QMovie is mostly useful if one wants to play a simple animation without the added complexity of a multimedia framework to install and deploy.]]>
- example,movie,widgets,qmovie,qlabel,phonon multimedia framework,qmovie
-
-
- QWidget's event handlers to receive the events generated for the application's widgets.]]>
- example,scribble,widgets,qwidget
-
-
-
- example,shapedclock,widgets
-
-
- QSlider, QScrollBar and QDial. They all inherit most of their functionality from QAbstractSlider, and can in theory replace each other in an application since the differences only concern their look and feel. This example shows what they look like, how they work and how their behavior and appearance can be manipulated through their properties.]]>
- example,sliders,widgets,qslider,qscrollbar,qdial,qabstractslider
-
-
- QSpinBox widget to more complex editors like the QDateTimeEdit widget.]]>
- example,spinboxes,widgets,qspinbox,qdatetimeedit
-
-
-
- example,styles,widgets
-
-
-
- example,stylesheet,widgets
-
-
-
- example,tablet,widgets
-
-
-
- example,tetrix,widgets
-
-
-
- example,tooltips,widgets
-
-
- QBasicTimer and timerEvent(). In addition, the example demonstrates how to use QFontMetrics to determine the size of text on screen.]]>
- example,wiggly,widgets,qbasictimer,timerevent(),qfontmetrics
-
-
-
- example,windowflags,widgets
-
-
- QWebFrame with JavaScript to extract form data.]]>
- example,formextractor,webkit,qwebframe
-
-
- QtWebKit's QWebView to preview HTML data written in a QPlainTextEdit.]]>
- example,previewer,webkit,qtwebkit,qwebview,qplaintextedit
-
-
- QtWebKit to create a web browser with special effects and content manipulation.]]>
- example,fancybrowser,webkit,qtwebkit
-
-
- QtWebKit.]]>
- example,googlechat,webkit,qtwebkit
-
-
-
- example,saxbookmarks,xml
-
-
-
- example,dombookmarks,xml
-
-
-
- example,rsslisting,xml
-
-
- QXmlStreamReader class for reading, and QXmlStreamWriter class for writing the files.]]>
- example,streambookmarks,xml,qxmlstreamreader,qxmlstreamwriter
-
-
- QtXmlPatterns to query XML data loaded from a file.]]>
- example,recipes,xmlpatterns,qtxmlpatterns
-
-
- QtXmlPatterns to query QObject trees by modeling the non-XML data structure of a QObject tree to look like XML.]]>
- example,qobjectxmlmodel,xmlpatterns,qtxmlpatterns,qobject,qobject
-
-
- QtXmlPatterns for querying non-XML data that is modeled to look like XML.]]>
- example,filetree,xmlpatterns,qtxmlpatterns
-
-
- wap.trafikanten.no that is run by the Norwegian governmental agency for public transport in Oslo. The service provides real time information about the departure of busses, trams and undergrounds for every station in the city area.]]>
- example,trafficinfo,xmlpatterns
-
-
- QtXmlPatterns to validate XML with a W3C XML Schema.]]>
- example,schema,xmlpatterns,qtxmlpatterns
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- tutorial,part1,tutorials,addressbook
-
-
-
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index 860a3bacf87..247c3822275 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -352,12 +352,8 @@ void ExamplesListModel::updateExamples()
{
QString examplesInstallPath;
QString demosInstallPath;
- QString examplesFallback;
- QString demosFallback;
- QString sourceFallback;
- QStringList sources = exampleSources(&examplesInstallPath, &demosInstallPath,
- &examplesFallback, &demosFallback, &sourceFallback);
+ QStringList sources = exampleSources(&examplesInstallPath, &demosInstallPath);
beginResetModel();
m_tags.clear();
@@ -375,18 +371,6 @@ void ExamplesListModel::updateExamples()
QString offsetPath = fi.path();
QDir examplesDir(offsetPath);
QDir demosDir(offsetPath);
- if (!examplesFallback.isEmpty()) {
- // Look at Qt source directory at first,
- // since examplesPath() / demosPath() points at the build directory
- examplesDir = sourceFallback + QLatin1String("/examples");
- demosDir = sourceFallback + QLatin1String("/demos");
- // if examples or demos don't exist in source, try the directories
- // that qmake -query gave (i.e. in the build directory)
- if (!examplesDir.exists() || !demosDir.exists()) {
- examplesDir = examplesFallback;
- demosDir = demosFallback;
- }
- }
if (debugExamples())
qWarning() << QString::fromLatin1("Reading file '%1'...").arg(fi.absoluteFilePath());
@@ -488,13 +472,8 @@ int ExamplesListModel::findHighestQtVersion() const
return newVersion->uniqueId();
}
-QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QString *demosInstallPath,
- QString *examplesFallback, QString *demosFallback,
- QString *sourceFallback)
+QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QString *demosInstallPath)
{
- QTC_CHECK(examplesFallback);
- QTC_CHECK(demosFallback);
- QTC_CHECK(sourceFallback);
QStringList sources;
QString resourceDir = Core::ICore::resourcePath() + QLatin1String("/welcomescreen/");
@@ -523,12 +502,6 @@ QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QStr
if (size > 0)
return sources;
- // try to find a suitable Qt version
- // fallbacks are passed back if no example manifest is found
- // and we fallback to Qt Creator's shipped manifest (e.g. only old Qt Versions found)
- QString potentialExamplesFallback;
- QString potentialDemosFallback;
- QString potentialSourceFallback;
const QStringList pattern(QLatin1String("*.xml"));
foreach (BaseQtVersion *version, qtVersions()) {
@@ -536,29 +509,25 @@ QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QStr
if (version->uniqueId() != m_uniqueQtId && m_uniqueQtId != noQtVersionsId)
continue;
- if (version->qtVersion().majorVersion == 5) {
- // examples directory in Qt5 is under the qtbase submodule,
- // search other submodule directories for further manifest files
- QDir qt5docPath = QDir(version->documentationPath());
- const QStringList examplesPattern(QLatin1String("examples-manifest.xml"));
- const QStringList demosPattern(QLatin1String("demos-manifest.xml"));
- QFileInfoList fis;
- foreach (QFileInfo subDir, qt5docPath.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
- fis << QDir(subDir.absoluteFilePath()).entryInfoList(examplesPattern);
- fis << QDir(subDir.absoluteFilePath()).entryInfoList(demosPattern);
- }
- if (!fis.isEmpty()) {
- foreach (const QFileInfo &fi, fis)
- sources.append(fi.filePath());
- if (examplesInstallPath)
- *examplesInstallPath = version->examplesPath();
- if (demosInstallPath)
- *demosInstallPath = version->demosPath();
- return sources;
- }
+ // search for examples-manifest.xml, demos-manifest.xml in doc/*/
+ QDir qt5docPath = QDir(version->documentationPath());
+ const QStringList examplesPattern(QLatin1String("examples-manifest.xml"));
+ const QStringList demosPattern(QLatin1String("demos-manifest.xml"));
+ QFileInfoList fis;
+ foreach (QFileInfo subDir, qt5docPath.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
+ fis << QDir(subDir.absoluteFilePath()).entryInfoList(examplesPattern);
+ fis << QDir(subDir.absoluteFilePath()).entryInfoList(demosPattern);
+ }
+ if (!fis.isEmpty()) {
+ foreach (const QFileInfo &fi, fis)
+ sources.append(fi.filePath());
+ if (examplesInstallPath)
+ *examplesInstallPath = version->examplesPath();
+ if (demosInstallPath)
+ *demosInstallPath = version->demosPath();
+ return sources;
}
- QFileInfoList fis;
fis << QDir(version->examplesPath()).entryInfoList(pattern);
fis << QDir(version->demosPath()).entryInfoList(pattern);
if (!fis.isEmpty()) {
@@ -566,27 +535,8 @@ QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QStr
sources.append(fi.filePath());
return sources;
}
- // check if this Qt version would be the preferred fallback, Qt 4 only
- if (version->qtVersion().majorVersion == 4) { // cached, so no performance hit
- if (potentialExamplesFallback.isEmpty()) {
- potentialExamplesFallback = version->examplesPath();
- potentialDemosFallback = version->demosPath();
- potentialSourceFallback = version->sourcePath().toString();
- }
- }
}
- if (!potentialExamplesFallback.isEmpty()) {
- // We didn't find a manifest, use Creator-provided XML file with fall back Qt version
- // qDebug() << Q_FUNC_INFO << "falling through to Creator-provided XML file";
- sources << QString(resourceDir + QLatin1String("/examples_fallback.xml"));
- if (examplesFallback)
- *examplesFallback = potentialExamplesFallback;
- if (demosFallback)
- *demosFallback = potentialDemosFallback;
- if (sourceFallback)
- *sourceFallback = potentialSourceFallback;
- }
return sources;
}
diff --git a/src/plugins/qtsupport/exampleslistmodel.h b/src/plugins/qtsupport/exampleslistmodel.h
index a269a4f3125..6fdcd44498c 100644
--- a/src/plugins/qtsupport/exampleslistmodel.h
+++ b/src/plugins/qtsupport/exampleslistmodel.h
@@ -134,9 +134,7 @@ private:
void parseDemos(QXmlStreamReader *reader, const QString &projectsOffset,
const QString &demosInstallPath);
void parseTutorials(QXmlStreamReader *reader, const QString &projectsOffset);
- QStringList exampleSources(QString *examplesInstallPath, QString *demosInstallPath,
- QString *examplesFallback, QString *demosFallback,
- QString *sourceFallback);
+ QStringList exampleSources(QString *examplesInstallPath, QString *demosInstallPath);
QList m_qtVersions;
QList m_exampleItems;