genericproject.cpp 16.6 KB
Newer Older
Roberto Raggi's avatar
Roberto Raggi committed
1 2 3 4
/**************************************************************************
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
Roberto Raggi's avatar
Roberto Raggi committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
Roberto Raggi's avatar
Roberto Raggi committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
hjk's avatar
hjk committed
26
** contact the sales department at http://qt.nokia.com/contact.
Roberto Raggi's avatar
Roberto Raggi committed
27 28 29 30
**
**************************************************************************/

#include "genericproject.h"
Tobias Hunger's avatar
Tobias Hunger committed
31

dt's avatar
dt committed
32
#include "genericbuildconfiguration.h"
Tobias Hunger's avatar
Tobias Hunger committed
33 34
#include "genericprojectconstants.h"
#include "generictarget.h"
Roberto Raggi's avatar
Roberto Raggi committed
35

36
#include <projectexplorer/buildenvironmentwidget.h>
37
#include <projectexplorer/toolchain.h>
Roberto Raggi's avatar
Roberto Raggi committed
38 39 40
#include <projectexplorer/projectexplorerconstants.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <extensionsystem/pluginmanager.h>
41
#include <utils/pathchooser.h>
Roberto Raggi's avatar
Roberto Raggi committed
42 43
#include <coreplugin/icore.h>

44
#include <QtCore/QDir>
45
#include <QtCore/QProcessEnvironment>
Roberto Raggi's avatar
Roberto Raggi committed
46

47 48 49
#include <QtGui/QFormLayout>
#include <QtGui/QMainWindow>
#include <QtGui/QComboBox>
Roberto Raggi's avatar
Roberto Raggi committed
50 51 52

using namespace GenericProjectManager;
using namespace GenericProjectManager::Internal;
53
using namespace ProjectExplorer;
Roberto Raggi's avatar
Roberto Raggi committed
54

55
namespace {
56
const char * const TOOLCHAIN_KEY("GenericProjectManager.GenericProject.Toolchain");
57 58
} // end of anonymous namespace

59 60 61 62
////////////////////////////////////////////////////////////////////////////////////
// GenericProject
////////////////////////////////////////////////////////////////////////////////////

Roberto Raggi's avatar
Roberto Raggi committed
63
GenericProject::GenericProject(Manager *manager, const QString &fileName)
64 65
    : m_manager(manager),
      m_fileName(fileName),
Tobias Hunger's avatar
Tobias Hunger committed
66
      m_targetFactory(new GenericTargetFactory(this)),
67
      m_toolChain(0)
Roberto Raggi's avatar
Roberto Raggi committed
68
{
69
    QFileInfo fileInfo(m_fileName);
70 71
    QDir dir = fileInfo.dir();

72
    m_projectName      = fileInfo.completeBaseName();
73 74 75
    m_filesFileName    = QFileInfo(dir, m_projectName + QLatin1String(".files")).absoluteFilePath();
    m_includesFileName = QFileInfo(dir, m_projectName + QLatin1String(".includes")).absoluteFilePath();
    m_configFileName   = QFileInfo(dir, m_projectName + QLatin1String(".config")).absoluteFilePath();
76

77 78
    m_file = new GenericProjectFile(this, fileName);
    m_rootNode = new GenericProjectNode(this, m_file);
79

80
    m_manager->registerProject(this);
Roberto Raggi's avatar
Roberto Raggi committed
81 82 83 84
}

GenericProject::~GenericProject()
{
85
    m_manager->unregisterProject(this);
86

87 88
    delete m_rootNode;
    delete m_toolChain;
Roberto Raggi's avatar
Roberto Raggi committed
89 90
}

Tobias Hunger's avatar
Tobias Hunger committed
91 92 93 94 95 96
GenericTargetFactory *GenericProject::targetFactory() const
{
    return m_targetFactory;
}

GenericTarget *GenericProject::activeTarget() const
97
{
Tobias Hunger's avatar
Tobias Hunger committed
98
    return static_cast<GenericTarget *>(Project::activeTarget());
99 100
}

101
QString GenericProject::filesFileName() const
102
{ return m_filesFileName; }
103 104

QString GenericProject::includesFileName() const
105
{ return m_includesFileName; }
106 107

QString GenericProject::configFileName() const
108
{ return m_configFileName; }
109

110
static QStringList readLines(const QString &absoluteFileName)
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
{
    QStringList lines;

    QFile file(absoluteFileName);
    if (file.open(QFile::ReadOnly)) {
        QTextStream stream(&file);

        forever {
            QString line = stream.readLine();
            if (line.isNull())
                break;

            lines.append(line);
        }
    }

    return lines;
}

130
bool GenericProject::saveRawFileList(const QStringList &rawFileList)
131
{
132
    // Make sure we can open the file for writing
133
    QFile file(filesFileName());
134 135 136 137
    if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
        return false;

    QTextStream stream(&file);
138 139
    foreach (const QString &filePath, rawFileList)
        stream << filePath << QLatin1Char('\n');
140 141 142 143

    file.close();
    refresh(GenericProject::Files);
    return true;
144
}
145

146 147
bool GenericProject::addFiles(const QStringList &filePaths)
{
148 149 150 151 152
    QStringList newList = m_rawFileList;

    QDir baseDir(QFileInfo(m_fileName).dir());
    foreach (const QString &filePath, filePaths)
        newList.append(baseDir.relativeFilePath(filePath));
153

154
    return saveRawFileList(newList);
155 156 157 158
}

bool GenericProject::removeFiles(const QStringList &filePaths)
{
159
    QStringList newList = m_rawFileList;
160

161 162 163 164
    foreach (const QString &filePath, filePaths) {
        QHash<QString, QString>::iterator i = m_rawListEntries.find(filePath);
        if (i != m_rawListEntries.end())
            newList.removeOne(i.value());
165
    }
166

167
    return saveRawFileList(newList);
168 169
}

170
void GenericProject::parseProject(RefreshOptions options)
Roberto Raggi's avatar
Roberto Raggi committed
171
{
172 173 174
    if (options & Files) {
        m_rawListEntries.clear();
        m_rawFileList = readLines(filesFileName());
175
        m_files = processEntries(m_rawFileList, &m_rawListEntries);
176
    }
177

178
    if (options & Configuration) {
179
        m_projectIncludePaths = processEntries(readLines(includesFileName()));
180

181 182
        // TODO: Possibly load some configuration from the project file
        //QSettings projectInfo(m_fileName, QSettings::IniFormat);
Roberto Raggi's avatar
Roberto Raggi committed
183

184
        m_defines.clear();
Roberto Raggi's avatar
Roberto Raggi committed
185

186 187 188 189
        QFile configFile(configFileName());
        if (configFile.open(QFile::ReadOnly))
            m_defines = configFile.readAll();
    }
190

191 192
    if (options & Files)
        emit fileListChanged();
Roberto Raggi's avatar
Roberto Raggi committed
193 194
}

195
void GenericProject::refresh(RefreshOptions options)
Roberto Raggi's avatar
Roberto Raggi committed
196
{
197 198 199
    QSet<QString> oldFileList;
    if (!(options & Configuration))
        oldFileList = m_files.toSet();
200

201 202 203 204
    parseProject(options);

    if (options & Files)
        m_rootNode->refresh();
Roberto Raggi's avatar
Roberto Raggi committed
205 206 207 208

    CppTools::CppModelManagerInterface *modelManager =
        ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();

209 210
    if (m_toolChain && modelManager) {
        const QByteArray predefinedMacros = m_toolChain->predefinedMacros();
Roberto Raggi's avatar
Roberto Raggi committed
211 212 213

        CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
        pinfo.defines = predefinedMacros;
Roberto Raggi's avatar
Roberto Raggi committed
214
        pinfo.defines += '\n';
215
        pinfo.defines += m_defines;
Roberto Raggi's avatar
Roberto Raggi committed
216

217 218
        QStringList allIncludePaths;
        QStringList allFrameworkPaths;
Roberto Raggi's avatar
Roberto Raggi committed
219

220
        foreach (const ProjectExplorer::HeaderPath &headerPath, m_toolChain->systemHeaderPaths()) {
Roberto Raggi's avatar
Roberto Raggi committed
221 222 223 224 225 226
            if (headerPath.kind() == ProjectExplorer::HeaderPath::FrameworkHeaderPath)
                allFrameworkPaths.append(headerPath.path());
            else
                allIncludePaths.append(headerPath.path());
        }

Roberto Raggi's avatar
Roberto Raggi committed
227
        allIncludePaths += this->allIncludePaths();
Roberto Raggi's avatar
Roberto Raggi committed
228 229 230 231 232

        pinfo.frameworkPaths = allFrameworkPaths;
        pinfo.includePaths = allIncludePaths;

        // ### add _defines.
Roberto Raggi's avatar
Roberto Raggi committed
233 234
        pinfo.sourceFiles = files();
        pinfo.sourceFiles += generated();
Roberto Raggi's avatar
Roberto Raggi committed
235

236 237 238 239 240 241 242 243 244 245 246
        QStringList filesToUpdate;

        if (options & Configuration) {
            filesToUpdate = pinfo.sourceFiles;
            filesToUpdate.append(QLatin1String("<configuration>")); // XXX don't hardcode configuration file name
        } else if (options & Files) {
            // Only update files that got added to the list
            QSet<QString> newFileList = m_files.toSet();
            newFileList.subtract(oldFileList);
            filesToUpdate.append(newFileList.toList());
        }
247

Roberto Raggi's avatar
Roberto Raggi committed
248
        modelManager->updateProjectInfo(pinfo);
249
        modelManager->updateSourceFiles(filesToUpdate);
Roberto Raggi's avatar
Roberto Raggi committed
250 251 252
    }
}

253
/**
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
 * Expands environment variables in the given \a string when they are written
 * like $$(VARIABLE).
 */
static void expandEnvironmentVariables(const QProcessEnvironment &env, QString &string)
{
    const static QRegExp candidate(QLatin1String("\\$\\$\\((.+)\\)"));

    int index = candidate.indexIn(string);
    while (index != -1) {
        const QString value = env.value(candidate.cap(1));

        string.replace(index, candidate.matchedLength(), value);
        index += value.length();

        index = candidate.indexIn(string, index);
    }
}

/**
 * Expands environment variables and converts the path from relative to the
 * project to an absolute path.
 *
276
 * The \a map variable is an optional argument that will map the returned
277
 * absolute paths back to their original \a entries.
278
 */
279 280
QStringList GenericProject::processEntries(const QStringList &paths,
                                           QHash<QString, QString> *map) const
Roberto Raggi's avatar
Roberto Raggi committed
281
{
282
    const QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
283
    const QDir projectDir(QFileInfo(m_fileName).dir());
284

Roberto Raggi's avatar
Roberto Raggi committed
285
    QStringList absolutePaths;
286
    foreach (const QString &path, paths) {
287 288
        QString trimmedPath = path.trimmed();
        if (trimmedPath.isEmpty())
289 290
            continue;

291 292 293
        expandEnvironmentVariables(env, trimmedPath);

        const QString absPath = QFileInfo(projectDir, trimmedPath).absoluteFilePath();
294 295
        absolutePaths.append(absPath);
        if (map)
296
            map->insert(absPath, trimmedPath);
Roberto Raggi's avatar
Roberto Raggi committed
297 298 299 300 301
    }
    absolutePaths.removeDuplicates();
    return absolutePaths;
}

Roberto Raggi's avatar
Roberto Raggi committed
302 303 304
QStringList GenericProject::allIncludePaths() const
{
    QStringList paths;
305 306
    paths += m_includePaths;
    paths += m_projectIncludePaths;
Roberto Raggi's avatar
Roberto Raggi committed
307 308 309 310 311
    paths.removeDuplicates();
    return paths;
}

QStringList GenericProject::projectIncludePaths() const
312
{ return m_projectIncludePaths; }
Roberto Raggi's avatar
Roberto Raggi committed
313

Roberto Raggi's avatar
Roberto Raggi committed
314
QStringList GenericProject::files() const
315
{ return m_files; }
Roberto Raggi's avatar
Roberto Raggi committed
316 317

QStringList GenericProject::generated() const
318
{ return m_generated; }
Roberto Raggi's avatar
Roberto Raggi committed
319 320

QStringList GenericProject::includePaths() const
321
{ return m_includePaths; }
Roberto Raggi's avatar
Roberto Raggi committed
322 323

void GenericProject::setIncludePaths(const QStringList &includePaths)
324
{ m_includePaths = includePaths; }
Roberto Raggi's avatar
Roberto Raggi committed
325

Roberto Raggi's avatar
Roberto Raggi committed
326
QByteArray GenericProject::defines() const
327
{ return m_defines; }
Roberto Raggi's avatar
Roberto Raggi committed
328

329
void GenericProject::setToolChainType(ProjectExplorer::ToolChain::ToolChainType type)
Roberto Raggi's avatar
Roberto Raggi committed
330 331 332
{
    using namespace ProjectExplorer;

333
    m_toolChainType = type;
334

335 336
    delete m_toolChain;
    m_toolChain = 0;
Roberto Raggi's avatar
Roberto Raggi committed
337

338
    if (type == ToolChain::MinGW) {
Roberto Raggi's avatar
Roberto Raggi committed
339 340 341
        const QLatin1String qmake_cxx("g++"); // ### FIXME
        const QString mingwDirectory; // ### FIXME

342
        m_toolChain = ToolChain::createMinGWToolChain(qmake_cxx, mingwDirectory);
Roberto Raggi's avatar
Roberto Raggi committed
343

344
    } else if (type == ToolChain::MSVC) {
Roberto Raggi's avatar
Roberto Raggi committed
345
        const QString msvcVersion; // ### FIXME
346
        m_toolChain = ToolChain::createMSVCToolChain(msvcVersion, false);
Roberto Raggi's avatar
Roberto Raggi committed
347

348
    } else if (type == ToolChain::WINCE) {
Roberto Raggi's avatar
Roberto Raggi committed
349
        const QString msvcVersion, wincePlatform; // ### FIXME
350
        m_toolChain = ToolChain::createWinCEToolChain(msvcVersion, wincePlatform);
Roberto Raggi's avatar
Roberto Raggi committed
351

352
    } else if (type == ToolChain::GCC || type == ToolChain::GCC) {
Roberto Raggi's avatar
Roberto Raggi committed
353
        const QLatin1String qmake_cxx("g++"); // ### FIXME
354
        m_toolChain = ToolChain::createGccToolChain(qmake_cxx);
Roberto Raggi's avatar
Roberto Raggi committed
355 356 357
    }
}

358 359 360 361 362
ProjectExplorer::ToolChain *GenericProject::toolChain() const
{
    return m_toolChain;
}

363 364
ProjectExplorer::ToolChain::ToolChainType GenericProject::toolChainType() const
{ return m_toolChainType; }
365

366
QString GenericProject::displayName() const
Roberto Raggi's avatar
Roberto Raggi committed
367
{
368
    return m_projectName;
Roberto Raggi's avatar
Roberto Raggi committed
369 370
}

Tobias Hunger's avatar
Tobias Hunger committed
371 372 373 374 375
QString GenericProject::id() const
{
    return QLatin1String("GenericProjectManager.GenericProject");
}

Roberto Raggi's avatar
Roberto Raggi committed
376 377
Core::IFile *GenericProject::file() const
{
378
    return m_file;
Roberto Raggi's avatar
Roberto Raggi committed
379 380 381 382
}

ProjectExplorer::IProjectManager *GenericProject::projectManager() const
{
383
    return m_manager;
Roberto Raggi's avatar
Roberto Raggi committed
384 385 386 387 388 389 390 391 392 393 394 395
}

QList<ProjectExplorer::Project *> GenericProject::dependsOn()
{
    return QList<Project *>();
}

bool GenericProject::isApplication() const
{
    return true;
}

dt's avatar
dt committed
396
ProjectExplorer::BuildConfigWidget *GenericProject::createConfigWidget()
Roberto Raggi's avatar
Roberto Raggi committed
397 398 399 400
{
    return new GenericBuildSettingsWidget(this);
}

dt's avatar
dt committed
401
QList<ProjectExplorer::BuildConfigWidget*> GenericProject::subConfigWidgets()
Roberto Raggi's avatar
Roberto Raggi committed
402
{
403 404 405
    QList<ProjectExplorer::BuildConfigWidget*> list;
    list << new BuildEnvironmentWidget;
    return list;
Roberto Raggi's avatar
Roberto Raggi committed
406 407
}

408
GenericProjectNode *GenericProject::rootProjectNode() const
Roberto Raggi's avatar
Roberto Raggi committed
409
{
410
    return m_rootNode;
Roberto Raggi's avatar
Roberto Raggi committed
411 412 413 414
}

QStringList GenericProject::files(FilesMode fileMode) const
{
415
    Q_UNUSED(fileMode)
416
    return m_files; // ### TODO: handle generated files here.
Roberto Raggi's avatar
Roberto Raggi committed
417 418
}

Tobias Hunger's avatar
Tobias Hunger committed
419
QStringList GenericProject::buildTargets() const
Roberto Raggi's avatar
Roberto Raggi committed
420 421 422 423 424 425 426
{
    QStringList targets;
    targets.append(QLatin1String("all"));
    targets.append(QLatin1String("clean"));
    return targets;
}

427
QVariantMap GenericProject::toMap() const
Roberto Raggi's avatar
Roberto Raggi committed
428
{
429 430 431 432 433 434 435 436 437
    QVariantMap map(Project::toMap());
    map.insert(QLatin1String(TOOLCHAIN_KEY), static_cast<int>(m_toolChainType));
    return map;
}

bool GenericProject::fromMap(const QVariantMap &map)
{
    if (!Project::fromMap(map))
        return false;
Roberto Raggi's avatar
Roberto Raggi committed
438

439
    // Add default BC:
Tobias Hunger's avatar
Tobias Hunger committed
440 441
    if (targets().isEmpty())
        addTarget(targetFactory()->create(this, QLatin1String(GENERIC_DESKTOP_TARGET_ID)));
442

443 444 445
    ToolChain::ToolChainType type =
            static_cast<ProjectExplorer::ToolChain::ToolChainType>
            (map.value(QLatin1String(TOOLCHAIN_KEY), 0).toInt());
Roberto Raggi's avatar
Roberto Raggi committed
446

447
    setToolChainType(type);
Roberto Raggi's avatar
Roberto Raggi committed
448 449

    setIncludePaths(allIncludePaths());
450

451
    refresh(Everything);
dt's avatar
dt committed
452
    return true;
453 454
}

Roberto Raggi's avatar
Roberto Raggi committed
455 456 457
////////////////////////////////////////////////////////////////////////////////////
// GenericBuildSettingsWidget
////////////////////////////////////////////////////////////////////////////////////
458

Roberto Raggi's avatar
Roberto Raggi committed
459
GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
dt's avatar
dt committed
460
    : m_project(project), m_buildConfiguration(0)
Roberto Raggi's avatar
Roberto Raggi committed
461 462
{
    QFormLayout *fl = new QFormLayout(this);
463 464
    fl->setContentsMargins(0, -1, 0, -1);
    fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
465

466
    // Configuration name
467
    m_nameLineEdit = new QLineEdit;
468 469 470 471 472
    fl->addRow(tr("Configuration Name:"), m_nameLineEdit);

    connect(m_nameLineEdit, SIGNAL(textEdited(QString)),
            this, SLOT(configNameEdited(QString)));

473
    // build directory
474
    m_pathChooser = new Utils::PathChooser(this);
475 476
    m_pathChooser->setEnabled(true);
    fl->addRow(tr("Build directory:"), m_pathChooser);
con's avatar
con committed
477
    connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
478

479
    // tool chain
480
    QComboBox *toolChainChooser = new QComboBox;
481
    toolChainChooser->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
482
    using namespace ProjectExplorer;
483 484
    int index = 0;
    int selectedIndex = -1;
485
    foreach (ToolChain::ToolChainType tc, ToolChain::supportedToolChains()) {
486 487 488 489
        toolChainChooser->addItem(ToolChain::toolChainName(tc), QVariant::fromValue<ToolChain::ToolChainType>(tc));
        if (m_project->toolChainType() == tc)
            selectedIndex = index;
        ++index;
490 491
    }

492
    toolChainChooser->setCurrentIndex(selectedIndex);
493
    fl->addRow(tr("Tool Chain:"), toolChainChooser);
494
    connect(toolChainChooser, SIGNAL(activated(int)), this, SLOT(toolChainSelected(int)));
Roberto Raggi's avatar
Roberto Raggi committed
495 496 497 498 499 500 501 502
}

GenericBuildSettingsWidget::~GenericBuildSettingsWidget()
{ }

QString GenericBuildSettingsWidget::displayName() const
{ return tr("Generic Manager"); }

dt's avatar
dt committed
503
void GenericBuildSettingsWidget::init(BuildConfiguration *bc)
Roberto Raggi's avatar
Roberto Raggi committed
504
{
505
    m_buildConfiguration = static_cast<GenericBuildConfiguration *>(bc);
506
    m_nameLineEdit->setText(m_buildConfiguration->displayName());
507
    m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory());
Roberto Raggi's avatar
Roberto Raggi committed
508 509
}

510
void GenericBuildSettingsWidget::configNameEdited(const QString &name)
511 512 513 514
{
    m_buildConfiguration->setDisplayName(name);
}

Roberto Raggi's avatar
Roberto Raggi committed
515 516
void GenericBuildSettingsWidget::buildDirectoryChanged()
{
517
    m_buildConfiguration->setBuildDirectory(m_pathChooser->path());
Roberto Raggi's avatar
Roberto Raggi committed
518 519
}

520 521 522 523 524 525 526 527 528
void GenericBuildSettingsWidget::toolChainSelected(int index)
{
    using namespace ProjectExplorer;

    QComboBox *toolChainChooser = qobject_cast<QComboBox*>(sender());
    ToolChain::ToolChainType type = toolChainChooser->itemData(index).value<ToolChain::ToolChainType>();
    m_project->setToolChainType(type);
}

Roberto Raggi's avatar
Roberto Raggi committed
529 530 531
////////////////////////////////////////////////////////////////////////////////////
// GenericProjectFile
////////////////////////////////////////////////////////////////////////////////////
532

Roberto Raggi's avatar
Roberto Raggi committed
533 534
GenericProjectFile::GenericProjectFile(GenericProject *parent, QString fileName)
    : Core::IFile(parent),
535 536
      m_project(parent),
      m_fileName(fileName)
Roberto Raggi's avatar
Roberto Raggi committed
537 538 539 540 541 542 543 544 545 546 547 548
{ }

GenericProjectFile::~GenericProjectFile()
{ }

bool GenericProjectFile::save(const QString &)
{
    return false;
}

QString GenericProjectFile::fileName() const
{
549
    return m_fileName;
Roberto Raggi's avatar
Roberto Raggi committed
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
}

QString GenericProjectFile::defaultPath() const
{
    return QString();
}

QString GenericProjectFile::suggestedFileName() const
{
    return QString();
}

QString GenericProjectFile::mimeType() const
{
    return Constants::GENERICMIMETYPE;
}

bool GenericProjectFile::isModified() const
{
    return false;
}

bool GenericProjectFile::isReadOnly() const
{
    return true;
}

bool GenericProjectFile::isSaveAsAllowed() const
{
    return false;
}

void GenericProjectFile::modified(ReloadBehavior *)
{
}