~carla-sella/ubuntu-docviewer-app/remove-single-file

« back to all changes in this revision

Viewing changes to src/app/docviewer-application.cpp

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2015-05-18 17:43:17 UTC
  • mfrom: (122.1.15 plugins-renaming)
  • Revision ID: tarmac-20150518174317-qn6fxaq6ee1bw83t
- Moved DocumentsModel class in the DocumentViewer module.
- Refactored DocviewerFile class
- Refactored DocumentsModel class
- Use SortFilterModel from Ubuntu.Components, instead of QSortFilterProxyModel
- Renamed com.ubuntu.popplerqmlplugin module in DocumentViewer.PDF
- Renamed com.ubuntu.fileqmlplugin module in DocumentViewer
- Removed FileReader class
- Added support for testing DocumentsModel class through Autopilot. Fixes: https://bugs.launchpad.net/bugs/1445011.

Approved by Ubuntu Phone Apps Jenkins Bot, Alan Pope .

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "content-communicator.h"
22
22
#include "command-line-parser.h"
23
23
#include "urlhandler.h"
24
 
#include "quick/documentmodel.h"
25
24
 
26
25
#include <QQuickItem>
27
26
#include <QStandardPaths>
119
118
    // in the sistem if there is one
120
119
    importPathList.prepend(QCoreApplication::applicationDirPath() + "/../plugin/");
121
120
    m_view->engine()->setImportPathList(importPathList);
122
 
 
123
 
    qmlRegisterType<SortFilterDocumentModel>("DocumentViewer", 1, 0, "DocumentsModel");
124
121
}
125
122
 
126
123
/*!
156
153
}
157
154
 
158
155
/*!
 
156
 * \brief DocViewerApplication::getDocumentsDir
 
157
 * Returns the documents dir passed as a parameter
 
158
 */
 
159
const QString& DocViewerApplication::getDocumentsDir() const
 
160
{
 
161
    return m_cmdLineParser->documentsDir();
 
162
}
 
163
 
 
164
 
 
165
/*!
159
166
 * \brief DocViewerApplication::createView
160
167
 * Create the master QDeclarativeView that all the pages will operate within
161
168
 */