Merge remote-tracking branch 'origin/4.8'

Change-Id: I2ebb6de6a5777a5a756e5765bd397323f84971ce
This commit is contained in:
Eike Ziller
2018-10-01 14:34:21 +02:00
24 changed files with 163 additions and 107 deletions

View File

@@ -1525,16 +1525,16 @@ void PluginManagerPrivate::profilingReport(const char *what, const PluginSpec *s
const int absoluteElapsedMS = m_profileTimer->elapsed();
const int elapsedMS = absoluteElapsedMS - m_profileElapsedMS;
m_profileElapsedMS = absoluteElapsedMS;
if (spec)
m_profileTotal[spec] += elapsedMS;
if (spec)
qDebug("%-22s %-22s %8dms (%8dms)", what, qPrintable(spec->name()), absoluteElapsedMS, elapsedMS);
else
qDebug("%-45s %8dms (%8dms)", what, absoluteElapsedMS, elapsedMS);
if (what && *what == '<') {
QString tc;
if (spec)
if (spec) {
m_profileTotal[spec] += elapsedMS;
tc = spec->name() + '_';
}
tc += QString::fromUtf8(QByteArray(what + 1));
Utils::Benchmarker::report("loadPlugins", tc, elapsedMS);
}

View File

@@ -655,6 +655,7 @@ QString PathChooser::promptDialogTitle() const
void PathChooser::setPromptDialogFilter(const QString &filter)
{
d->m_dialogFilter = filter;
d->m_lineEdit->validate();
}
QString PathChooser::promptDialogFilter() const

View File

@@ -54,7 +54,8 @@ QStringList filterInterfering(const QStringList &provided, QStringList *omitted)
"--gtest_stream_result_to=",
"--gtest_break_on_failure",
"--gtest_throw_on_failure",
"--gtest_color="
"--gtest_color=",
"--gtest_print_time="
};
QSet<QString> allowed = Utils::filtered(provided.toSet(), [] (const QString &arg) {

View File

@@ -69,9 +69,9 @@ static QIcon testResultIcon(Result::Type result) {
case Result::MessageTestCaseFail:
return icons[Result::Fail];
case Result::MessageTestCaseSuccessWarn:
return icons[13];
case Result::MessageTestCaseFailWarn:
return icons[14];
case Result::MessageTestCaseFailWarn:
return icons[15];
default:
return QIcon();
}

View File

@@ -87,17 +87,19 @@ void CppcheckRunner::addToQueue(const Utils::FileNameList &files,
}
if (m_isRunning) {
if (existing == m_currentFiles)
m_process->kill(); // Further processing in handleFinished
stop(existing);
return;
}
m_queueTimer.start();
}
void CppcheckRunner::stop()
void CppcheckRunner::stop(const Utils::FileNameList &files)
{
if (m_isRunning)
if (!m_isRunning)
return;
if (files.isEmpty() || m_currentFiles == files)
m_process->kill();
}

View File

@@ -51,7 +51,7 @@ public:
void addToQueue(const Utils::FileNameList &files,
const QString &additionalArguments = {});
void removeFromQueue(const Utils::FileNameList &files);
void stop();
void stop(const Utils::FileNameList &files = {});
const Utils::FileNameList &currentFiles() const;
QString currentCommand() const;

View File

@@ -47,7 +47,7 @@ namespace Internal {
CppcheckTool::CppcheckTool(CppcheckTextMarkManager &marks) :
m_marks(marks),
m_progressRegexp("^.* checked (\\d)% done$"),
m_progressRegexp("^.* checked (\\d+)% done$"),
m_messageRegexp("^(.+),(\\d+),(\\w+),(\\w+),(.*)$")
{
m_runner = std::make_unique<CppcheckRunner>(*this);
@@ -229,7 +229,7 @@ void CppcheckTool::addToQueue(const Utils::FileNameList &files, CppTools::Projec
void CppcheckTool::stop(const Utils::FileNameList &files)
{
m_runner->removeFromQueue(files);
m_runner->stop();
m_runner->stop(files);
}
void CppcheckTool::startParsing()

View File

@@ -67,7 +67,6 @@ BranchView::BranchView() :
m_model(new BranchModel(GitPlugin::client(), this))
{
m_addButton->setIcon(Utils::Icons::PLUS_TOOLBAR.icon());
m_addButton->setToolTip(tr("Add Branch"));
m_addButton->setProperty("noArrow", true);
connect(m_addButton, &QToolButton::clicked, this, &BranchView::add);
@@ -126,10 +125,12 @@ void BranchView::refresh(const QString &repository, bool force)
m_repository = repository;
if (m_repository.isEmpty()) {
m_repositoryLabel->setText(tr("<No repository>"));
m_addButton->setToolTip(tr("Create Git Repository..."));
m_branchView->setEnabled(false);
} else {
m_repositoryLabel->setText(QDir::toNativeSeparators(m_repository));
m_repositoryLabel->setToolTip(GitPlugin::msgRepositoryLabel(m_repository));
m_addButton->setToolTip(tr("Add Branch..."));
m_branchView->setEnabled(true);
}
QString errorMessage;
@@ -180,6 +181,9 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
contextMenu.addAction(tr("Fetch"), this, [this, &remote]() {
GitPlugin::client()->fetch(m_repository, *remote);
});
contextMenu.addSeparator();
contextMenu.addAction(tr("Manage Remotes..."), GitPlugin::instance(),
&GitPlugin::manageRemotes);
}
if (hasActions) {
if (!currentSelected && (isLocal || isTag))
@@ -249,6 +253,11 @@ QModelIndex BranchView::selectedIndex()
bool BranchView::add()
{
if (m_repository.isEmpty()) {
GitPlugin::instance()->initRepository();
return true;
}
QModelIndex trackedIndex = selectedIndex();
QString trackedBranch = m_model->fullName(trackedIndex);
if (trackedBranch.isEmpty()) {

View File

@@ -1564,10 +1564,11 @@ bool GitClient::synchronousRevParseCmd(const QString &workingDirectory, const QS
}
// Retrieve head revision
QString GitClient::synchronousTopRevision(const QString &workingDirectory, QString *errorMessageIn)
QString GitClient::synchronousTopRevision(const QString &workingDirectory)
{
QString revision;
if (!synchronousRevParseCmd(workingDirectory, HEAD, &revision, errorMessageIn))
QString errorMessage;
if (!synchronousRevParseCmd(workingDirectory, HEAD, &revision, &errorMessage))
return QString();
return revision;

View File

@@ -235,7 +235,7 @@ public:
QString synchronousTopic(const QString &workingDirectory) const;
bool synchronousRevParseCmd(const QString &workingDirectory, const QString &ref,
QString *output, QString *errorMessage = nullptr) const;
QString synchronousTopRevision(const QString &workingDirectory, QString *errorMessage = nullptr);
QString synchronousTopRevision(const QString &workingDirectory);
void synchronousTagsForCommit(const QString &workingDirectory, const QString &revision,
QString &precedes, QString &follows) const;
bool isRemoteCommit(const QString &workingDirectory, const QString &commit);

View File

@@ -573,7 +573,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
remoteRepositoryMenu->addSeparator(context);
createRepositoryAction(remoteRepositoryMenu, tr("Manage Remotes..."), "Git.RemoteList",
context, false, std::bind(&GitPlugin::remoteList, this));
context, false, std::bind(&GitPlugin::manageRemotes, this));
/* \"Remote Repository" menu */
@@ -1314,11 +1314,16 @@ void GitPlugin::branchList()
NavigationWidget::activateSubWidget(Constants::GIT_BRANCH_VIEW_ID, Side::Right);
}
void GitPlugin::remoteList()
void GitPlugin::manageRemotes()
{
showNonModalDialog(currentState().topLevel(), m_remoteDialog);
}
void GitPlugin::initRepository()
{
createRepository();
}
void GitPlugin::stashList()
{
showNonModalDialog(currentState().topLevel(), m_stashDialog);

View File

@@ -92,6 +92,8 @@ public:
QObject *remoteCommand(const QStringList &options, const QString &workingDirectory,
const QStringList &args) override;
void manageRemotes();
void initRepository();
protected:
void updateActions(VcsBase::VcsBasePlugin::ActionState) override;
@@ -135,7 +137,6 @@ private:
void stashSnapshot();
void stashPop();
void branchList();
void remoteList();
void stashList();
void fetch();
void pull();

View File

@@ -78,8 +78,11 @@ Core::Id GitVersionControl::id() const
bool GitVersionControl::isVcsFileOrDirectory(const Utils::FileName &fileName) const
{
return fileName.toFileInfo().isDir()
&& !fileName.fileName().compare(".git", Utils::HostOsInfo::fileNameCaseSensitivity());
if (fileName.fileName().compare(".git", Utils::HostOsInfo::fileNameCaseSensitivity()))
return false;
if (fileName.toFileInfo().isDir())
return true;
return QFile(fileName.toString()).readLine().startsWith("gitdir: ");
}
bool GitVersionControl::isConfigured() const

View File

@@ -76,7 +76,7 @@ public:
static void aboutToShutdown();
void handleHelpRequest(
Q_INVOKABLE void handleHelpRequest(
const QUrl &url,
Core::HelpManager::HelpViewerLocation location = Core::HelpManager::HelpModeAlways) override;

View File

@@ -1707,9 +1707,11 @@ void ProjectExplorerPlugin::extensionsInitialized()
BuildManager::extensionsInitialized();
DeviceManager::instance()->addDevice(IDevice::Ptr(new DesktopDevice));
// delay restoring kits until UI is shown for improved perceived startup performance
QTimer::singleShot(0, this, &ProjectExplorerPlugin::restoreKits);
}
bool ProjectExplorerPlugin::delayedInitialize()
void ProjectExplorerPlugin::restoreKits()
{
dd->determineSessionToRestoreAtStartup();
ExtraAbi::load(); // Load this before Toolchains!
@@ -1717,7 +1719,6 @@ bool ProjectExplorerPlugin::delayedInitialize()
ToolChainManager::restoreToolChains();
dd->m_kitManager->restoreKits();
QTimer::singleShot(0, dd, &ProjectExplorerPluginPrivate::restoreSession); // delay a bit...
return true;
}
void ProjectExplorerPluginPrivate::updateRunWithoutDeployMenu()

View File

@@ -123,7 +123,7 @@ public:
//PluginInterface
bool initialize(const QStringList &arguments, QString *errorMessage) override;
void extensionsInitialized() override;
bool delayedInitialize() override;
void restoreKits();
ShutdownFlag aboutToShutdown() override;
static void setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes);

View File

@@ -43,6 +43,16 @@ using namespace ProjectExplorer;
using namespace QmakeProjectManager;
using namespace QmakeProjectManager::Internal;
static void fillLibraryPlatformTypes(QComboBox *comboBox)
{
comboBox->clear();
comboBox->addItem("Windows (*.lib lib*.a)", int(Utils::OsTypeWindows));
comboBox->addItem("Linux (lib*.so lib*.a)", int(Utils::OsTypeLinux));
comboBox->addItem("macOS (*.dylib *.a *.framework)", int(Utils::OsTypeMac));
const int currentIndex = comboBox->findData(int(Utils::HostOsInfo::hostOs()));
comboBox->setCurrentIndex(std::max(0, currentIndex));
}
LibraryDetailsController::LibraryDetailsController(
Ui::LibraryDetailsWidget *libraryDetails,
const QString &proFile, QObject *parent) :
@@ -73,6 +83,8 @@ LibraryDetailsController::LibraryDetailsController(
this, &LibraryDetailsController::slotPlatformChanged);
connect(m_libraryDetailsWidget->winCheckBox, &QAbstractButton::clicked,
this, &LibraryDetailsController::slotPlatformChanged);
fillLibraryPlatformTypes(m_libraryDetailsWidget->libraryTypeComboBox);
}
Ui::LibraryDetailsWidget *LibraryDetailsController::libraryDetailsWidget() const
@@ -95,6 +107,16 @@ AddLibraryWizard::MacLibraryType LibraryDetailsController::macLibraryType() cons
return m_macLibraryType;
}
Utils::OsType LibraryDetailsController::libraryPlatformType() const
{
return Utils::OsType(m_libraryDetailsWidget->libraryTypeComboBox->currentData().value<int>());
}
QString LibraryDetailsController::libraryPlatformFilter() const
{
return m_libraryDetailsWidget->libraryTypeComboBox->currentText();
}
void LibraryDetailsController::updateGui()
{
// read values from gui
@@ -249,6 +271,8 @@ void LibraryDetailsController::setMacLibraryGroupVisible(bool ena)
void LibraryDetailsController::setLibraryPathChooserVisible(bool ena)
{
libraryDetailsWidget()->libraryTypeComboBox->setVisible(ena);
libraryDetailsWidget()->libraryTypeLabel->setVisible(ena);
libraryDetailsWidget()->libraryPathChooser->setVisible(ena);
libraryDetailsWidget()->libraryFileLabel->setVisible(ena);
}
@@ -578,29 +602,6 @@ NonInternalLibraryDetailsController::NonInternalLibraryDetailsController(
setLibraryComboBoxVisible(false);
setLibraryPathChooserVisible(true);
if (Utils::HostOsInfo::isWindowsHost()) {
libraryDetailsWidget()->libraryPathChooser->setPromptDialogFilter(
QLatin1String("Library file (*.lib lib*.a)"));
setLinkageRadiosVisible(true);
setRemoveSuffixVisible(true);
} else {
setLinkageRadiosVisible(false);
setRemoveSuffixVisible(false);
}
if (Utils::HostOsInfo::isLinuxHost())
libraryDetailsWidget()->libraryPathChooser->setPromptDialogFilter(
QLatin1String("Library file (lib*.so lib*.a)"));
if (Utils::HostOsInfo::isMacHost()) {
libraryDetailsWidget()->libraryPathChooser->setPromptDialogFilter(
QLatin1String("Library file (*.dylib *.a *.framework)"));
// QLatin1String("Library file (lib*.dylib lib*.a *.framework)"));
libraryDetailsWidget()->libraryPathChooser->setExpectedKind(Utils::PathChooser::Any);
} else {
libraryDetailsWidget()->libraryPathChooser->setExpectedKind(Utils::PathChooser::File);
}
connect(libraryDetailsWidget()->libraryPathChooser, &Utils::PathChooser::validChanged,
this, &LibraryDetailsController::completeChanged);
connect(libraryDetailsWidget()->libraryPathChooser, &Utils::PathChooser::rawPathChanged,
@@ -611,12 +612,15 @@ NonInternalLibraryDetailsController::NonInternalLibraryDetailsController(
this, &NonInternalLibraryDetailsController::slotLinkageTypeChanged);
connect(libraryDetailsWidget()->staticRadio, &QAbstractButton::clicked,
this, &NonInternalLibraryDetailsController::slotLinkageTypeChanged);
connect(libraryDetailsWidget()->libraryTypeComboBox, &QComboBox::currentTextChanged,
this, &NonInternalLibraryDetailsController::slotLibraryTypeChanged);
slotLibraryTypeChanged();
}
AddLibraryWizard::LinkageType NonInternalLibraryDetailsController::suggestedLinkageType() const
{
AddLibraryWizard::LinkageType type = AddLibraryWizard::NoLinkage;
if (!Utils::HostOsInfo::isWindowsHost()) {
if (libraryPlatformType() != Utils::OsTypeWindows) {
if (libraryDetailsWidget()->libraryPathChooser->isValid()) {
QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path());
if (fi.suffix() == QLatin1String("a"))
@@ -631,7 +635,7 @@ AddLibraryWizard::LinkageType NonInternalLibraryDetailsController::suggestedLink
AddLibraryWizard::MacLibraryType NonInternalLibraryDetailsController::suggestedMacLibraryType() const
{
AddLibraryWizard::MacLibraryType type = AddLibraryWizard::NoLibraryType;
if (Utils::HostOsInfo::isMacHost()) {
if (libraryPlatformType() == Utils::OsTypeMac) {
if (libraryDetailsWidget()->libraryPathChooser->isValid()) {
QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path());
if (fi.suffix() == QLatin1String("framework"))
@@ -665,7 +669,7 @@ QString NonInternalLibraryDetailsController::suggestedIncludePath() const
void NonInternalLibraryDetailsController::updateWindowsOptionsEnablement()
{
bool ena = platforms() & (AddLibraryWizard::WindowsMinGWPlatform | AddLibraryWizard::WindowsMSVCPlatform);
if (Utils::HostOsInfo::isWindowsHost()) {
if (libraryPlatformType() == Utils::OsTypeWindows) {
libraryDetailsWidget()->addSuffixCheckBox->setEnabled(ena);
ena = true;
}
@@ -695,9 +699,26 @@ void NonInternalLibraryDetailsController::slotRemoveSuffixChanged(bool ena)
}
}
void NonInternalLibraryDetailsController::slotLibraryTypeChanged()
{
libraryDetailsWidget()->libraryPathChooser->setPromptDialogFilter(libraryPlatformFilter());
const bool isMacOs = libraryPlatformType() == Utils::OsTypeMac;
const bool isWindows = libraryPlatformType() == Utils::OsTypeWindows;
libraryDetailsWidget()->libraryPathChooser->setExpectedKind(isMacOs ? Utils::PathChooser::Any
: Utils::PathChooser::File);
setMacLibraryRadiosVisible(!isMacOs);
setLinkageRadiosVisible(isWindows);
setRemoveSuffixVisible(isWindows);
updateWindowsOptionsEnablement();
slotLibraryPathChanged();
slotLinkageTypeChanged();
libraryDetailsWidget()->detailsLayout->parentWidget()->window()->adjustSize();
}
void NonInternalLibraryDetailsController::slotLibraryPathChanged()
{
if (Utils::HostOsInfo::isWindowsHost()) {
if (libraryPlatformType() == Utils::OsTypeWindows) {
bool subfoldersEnabled = true;
bool removeSuffixEnabled = true;
if (libraryDetailsWidget()->libraryPathChooser->isValid()) {
@@ -739,13 +760,13 @@ QString NonInternalLibraryDetailsController::snippet() const
QString libName;
const bool removeSuffix = isWindowsGroupVisible()
&& libraryDetailsWidget()->removeSuffixCheckBox->isChecked();
if (Utils::HostOsInfo::isWindowsHost()) {
if (libraryPlatformType() == Utils::OsTypeWindows) {
libName = fi.completeBaseName();
if (removeSuffix && !libName.isEmpty()) // remove last letter which needs to be "d"
libName = libName.left(libName.size() - 1);
if (fi.completeSuffix() == QLatin1String("a")) // the mingw lib case
libName = libName.mid(3); // cut the "lib" prefix
} else if (Utils::HostOsInfo::isMacHost()) {
} else if (libraryPlatformType() == Utils::OsTypeMac) {
if (macLibraryType() == AddLibraryWizard::FrameworkType)
libName = fi.completeBaseName();
else
@@ -759,7 +780,7 @@ QString NonInternalLibraryDetailsController::snippet() const
if (isWindowsGroupVisible()) {
// when we are on Win but we don't generate the code for Win
// we still need to remove "debug" or "release" subfolder
const bool useSubfoldersCondition = (Utils::HostOsInfo::isWindowsHost())
const bool useSubfoldersCondition = (libraryPlatformType() == Utils::OsTypeWindows)
? true : platforms() & (AddLibraryWizard::WindowsMinGWPlatform
| AddLibraryWizard::WindowsMSVCPlatform);
if (useSubfoldersCondition)
@@ -774,7 +795,7 @@ QString NonInternalLibraryDetailsController::snippet() const
QFileInfo pfi(proFile());
QDir pdir = pfi.absoluteDir();
QString absoluteLibraryPath = fi.absolutePath();
if (Utils::HostOsInfo::isWindowsHost() && useSubfolders) { // drop last subfolder which needs to be "debug" or "release"
if (libraryPlatformType() == Utils::OsTypeWindows && useSubfolders) { // drop last subfolder which needs to be "debug" or "release"
QFileInfo libfi(absoluteLibraryPath);
absoluteLibraryPath = libfi.absolutePath();
}
@@ -889,12 +910,10 @@ void ExternalLibraryDetailsController::updateWindowsOptionsEnablement()
{
NonInternalLibraryDetailsController::updateWindowsOptionsEnablement();
if (!Utils::HostOsInfo::isWindowsHost())
return;
bool subfoldersEnabled = true;
bool removeSuffixEnabled = true;
if (libraryDetailsWidget()->libraryPathChooser->isValid()) {
if (libraryPlatformType() == Utils::OsTypeWindows
&& libraryDetailsWidget()->libraryPathChooser->isValid()) {
QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path());
QFileInfo dfi(fi.absolutePath());
const QString parentFolderName = dfi.fileName().toLower();
@@ -905,7 +924,6 @@ void ExternalLibraryDetailsController::updateWindowsOptionsEnablement()
if (baseName.isEmpty() || baseName.at(baseName.size() - 1).toLower() != QLatin1Char('d'))
removeSuffixEnabled = false;
}
libraryDetailsWidget()->useSubfoldersCheckBox->setEnabled(subfoldersEnabled);
libraryDetailsWidget()->removeSuffixCheckBox->setEnabled(removeSuffixEnabled);

View File

@@ -52,6 +52,8 @@ protected:
AddLibraryWizard::Platforms platforms() const;
AddLibraryWizard::LinkageType linkageType() const;
AddLibraryWizard::MacLibraryType macLibraryType() const;
Utils::OsType libraryPlatformType() const;
QString libraryPlatformFilter() const;
QString proFile() const;
bool isIncludePathChanged() const;
bool guiSignalsIgnored() const;
@@ -127,6 +129,7 @@ protected:
private:
void slotLinkageTypeChanged();
void slotRemoveSuffixChanged(bool ena);
void slotLibraryTypeChanged();
void slotLibraryPathChanged();
};

View File

@@ -6,13 +6,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>455</width>
<height>370</height>
<width>456</width>
<height>438</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="libraryFileLabel">
<property name="text">
<string>Library file:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="libraryLabel">
<property name="text">
@@ -20,30 +30,20 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="libraryComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="libraryFileLabel">
<property name="text">
<string>Library file:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="libraryPathChooser" native="true"/>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="includeLabel">
<property name="text">
<string>Include path:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="Utils::PathChooser" name="includePathChooser" native="true"/>
</item>
<item row="2" column="0">
<item row="3" column="1">
<widget class="QLineEdit" name="packageLineEdit"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="packageLabel">
<property name="text">
<string>Package:</string>
@@ -51,7 +51,20 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="packageLineEdit"/>
<widget class="Utils::PathChooser" name="libraryPathChooser" native="true"/>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="libraryComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="libraryTypeLabel">
<property name="text">
<string>Library type:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="libraryTypeComboBox"/>
</item>
</layout>
</item>
@@ -115,7 +128,10 @@
</layout>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="detailsLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QGroupBox" name="linkageGroupBox">
<property name="title">

View File

@@ -361,8 +361,9 @@ bool TarPackageCreationStep::writeHeader(QFile &tarFile, const QFileInfo &fileIn
const QByteArray sizeString = QString::fromLatin1("%1").arg(fileInfo.size(),
sizeof header.length - 1, 8, QLatin1Char('0')).toLatin1();
std::memcpy(&header.length, sizeString.data(), sizeString.length());
const QByteArray mtimeString = QString::fromLatin1("%1").arg(fileInfo.lastModified().toTime_t(),
sizeof header.mtime - 1, 8, QLatin1Char('0')).toLatin1();
const QByteArray mtimeString = QString::fromLatin1("%1").arg(
fileInfo.lastModified().toSecsSinceEpoch(),
sizeof header.mtime - 1, 8, QLatin1Char('0')).toLatin1();
std::memcpy(&header.mtime, mtimeString.data(), mtimeString.length());
if (fileInfo.isDir())
header.typeflag = '5';

View File

@@ -179,16 +179,10 @@ bool UpdateInfoPlugin::isCheckForUpdatesRunning() const
return d->m_checkUpdatesCommand;
}
bool UpdateInfoPlugin::delayedInitialize()
void UpdateInfoPlugin::extensionsInitialized()
{
if (isAutomaticCheck())
QTimer::singleShot(OneMinute, this, &UpdateInfoPlugin::startAutoCheckForUpdates);
return true;
}
void UpdateInfoPlugin::extensionsInitialized()
{
}
bool UpdateInfoPlugin::initialize(const QStringList & /* arguments */, QString *errorMessage)

View File

@@ -52,7 +52,6 @@ public:
UpdateInfoPlugin();
virtual ~UpdateInfoPlugin();
bool delayedInitialize();
void extensionsInitialized();
bool initialize(const QStringList &arguments, QString *errorMessage);

View File

@@ -65,7 +65,7 @@ def startQC(additionalParameters=None, withPreparedSettingsPath=True):
if platform.system() in ('Microsoft', 'Windows'): # for hooking into native file dialog
appWithOptions.extend(('-platform', 'windows:dialogs=none'))
test.log("Starting now: %s" % ' '.join(appWithOptions))
startApplication(' '.join(appWithOptions))
return startApplication(' '.join(appWithOptions))
def startedWithoutPluginError():
try:

View File

@@ -68,20 +68,21 @@ def main():
for current in availableProjectTypes:
category = current.keys()[0]
template = current.values()[0]
displayedPlatforms = __createProject__(category, template)
if template.startswith("Qt Quick Application - "):
qtVersionsForQuick = ["5.6", "5.10"] if template == "Qt Quick Application - Empty" else ["5.10"]
for counter, qtVersion in enumerate(qtVersionsForQuick):
def additionalFunc(displayedPlatforms, qtVersion):
requiredQtVersion = __createProjectHandleQtQuickSelection__(qtVersion)
__modifyAvailableTargets__(displayedPlatforms, requiredQtVersion, True)
handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
additionalFunc, qtVersion)
# are there more Quick combinations - then recreate this project
if counter < len(qtVersionsForQuick) - 1:
displayedPlatforms = __createProject__(category, template)
continue
handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms)
with TestSection("Testing project template %s -> %s" % (category, template)):
displayedPlatforms = __createProject__(category, template)
if template.startswith("Qt Quick Application - "):
qtVersionsForQuick = ["5.6", "5.10"] if template == "Qt Quick Application - Empty" else ["5.10"]
for counter, qtVersion in enumerate(qtVersionsForQuick):
def additionalFunc(displayedPlatforms, qtVersion):
requiredQtVersion = __createProjectHandleQtQuickSelection__(qtVersion)
__modifyAvailableTargets__(displayedPlatforms, requiredQtVersion, True)
handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
additionalFunc, qtVersion)
# are there more Quick combinations - then recreate this project
if counter < len(qtVersionsForQuick) - 1:
displayedPlatforms = __createProject__(category, template)
continue
handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms)
invokeMenuItem("File", "Exit")