~zeller-benjamin/qtcreator-plugin-ubuntu/qtc41-beta

« back to all changes in this revision

Viewing changes to ubuntuprojectfile.cpp

  • Committer: Juhapekka Piiroinen
  • Date: 2013-09-04 15:30:00 UTC
  • mto: (23.1.14 binary-plugin)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: juhapekka.piiroinen@canonical.com-20130904153000-r4lhfhrjlwmop277
Added cordova plugin from ubuntu-qtcreator-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2013 Canonical Ltd.
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify
5
 
 * it under the terms of the GNU Lesser General Public License as published by
6
 
 * the Free Software Foundation; version 2.1.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful,
9
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 * GNU Lesser General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU Lesser General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 *
16
 
 * Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
 
 */
18
 
 
19
 
#include "ubuntuprojectfile.h"
20
 
 
21
 
using namespace Ubuntu::Internal;
22
 
 
23
 
UbuntuProjectFile::UbuntuProjectFile(UbuntuProject *parent, QString fileName)
24
 
    : Core::IDocument(parent),
25
 
      m_project(parent),
26
 
      m_fileName(fileName) {
27
 
    QTC_CHECK(m_project);
28
 
    QTC_CHECK(!fileName.isEmpty());
29
 
}
30
 
 
31
 
bool UbuntuProjectFile::save(QString *, const QString &, bool) {
32
 
    return false;
33
 
}
34
 
 
35
 
void UbuntuProjectFile::rename(const QString &newName) {
36
 
    // Can't happen...
37
 
    Q_UNUSED(newName);
38
 
    Q_ASSERT(false);
39
 
}
40
 
 
41
 
QString UbuntuProjectFile::fileName() const {
42
 
    return m_fileName;
43
 
}
44
 
 
45
 
QString UbuntuProjectFile::defaultPath() const {
46
 
    return QString();
47
 
}
48
 
 
49
 
QString UbuntuProjectFile::suggestedFileName() const {
50
 
    return QString();
51
 
}
52
 
 
53
 
QString UbuntuProjectFile::mimeType() const {
54
 
    return QLatin1String(Constants::UBUNTUPROJECT_MIMETYPE);
55
 
}
56
 
 
57
 
bool UbuntuProjectFile::isModified() const {
58
 
    return false;
59
 
}
60
 
 
61
 
bool UbuntuProjectFile::isSaveAsAllowed() const {
62
 
    return false;
63
 
}
64
 
 
65
 
Core::IDocument::ReloadBehavior UbuntuProjectFile::reloadBehavior(ChangeTrigger state, ChangeType type) const {
66
 
    Q_UNUSED(state)
67
 
    Q_UNUSED(type)
68
 
    return BehaviorSilent;
69
 
}
70
 
 
71
 
bool UbuntuProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType) {
72
 
    Q_UNUSED(errorString)
73
 
    Q_UNUSED(flag)
74
 
 
75
 
    return true;
76
 
}