Skip to content

Commit

Permalink
Change 'Repository' to 'Project' in commands and add undo unchanged f…
Browse files Browse the repository at this point in the history
…iles command/setting

* changes 'Repository' to 'Project' in command names
* the project related commands (get latest, history, etc.) now work fine
* adds 'force' option to get latest to overwrite files in workspace that are writable
* adds option 'revert unchanged files' to settings (requires tfpt.exe)
 - if enabled undoes files that have no local changes (but are checked out) during checki
* adds 'Undo unchanged (Project)' command
  • Loading branch information
jgressmann authored and jesperhh committed Jun 10, 2016
1 parent cf8afac commit 574a2e4
Show file tree
Hide file tree
Showing 9 changed files with 187 additions and 98 deletions.
1 change: 1 addition & 0 deletions TeamFoundation.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
\"Name\" : \"TeamFoundation\",
\"Version\" : \"$$QTCREATOR_VERSION\",
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
\"Platform\" : \"(Windows.*)\",
\"Vendor\" : \"Jesper Hellesø Hansen\",
\"Copyright\" : \"(C) 2015 Jesper Hellesø Hansen\",
\"License\" : [ \"GNU Lesser General Public License 2.1\" ],
Expand Down
8 changes: 5 additions & 3 deletions settingspage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
**
** Team Foundation Server plugin for Qt Creator
** Copyright (C) 2014 Jesper Hellesø Hansen
**
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down Expand Up @@ -44,6 +44,7 @@ TeamFoundationSettings SettingsPageWidget::settings() const
rc.setValue(TeamFoundationSettings::userNameKey, m_ui.usernameLineEdit->text());
rc.setValue(TeamFoundationSettings::passwordKey, m_ui.passwordLineEdit->text());
rc.setValue(TeamFoundationSettings::timeoutKey, m_ui.timeOutSpinBox->value());
rc.setValue(TeamFoundationSettings::revertUnchangedFilesBeforeCheckinKey, m_ui.revertUnchangedFilesBeforeCheckin->isChecked());
return rc;
}

Expand All @@ -54,6 +55,7 @@ void SettingsPageWidget::setSettings(const TeamFoundationSettings &s)
m_ui.usernameLineEdit->setText(s.stringValue(TeamFoundationSettings::userNameKey));
m_ui.passwordLineEdit->setText(s.stringValue(TeamFoundationSettings::passwordKey));
m_ui.timeOutSpinBox->setValue(s.intValue(TeamFoundationSettings::timeoutKey));
m_ui.revertUnchangedFilesBeforeCheckin->setChecked(s.boolValue(TeamFoundationSettings::revertUnchangedFilesBeforeCheckinKey));
}

SettingsPage::SettingsPage() :
Expand Down
39 changes: 23 additions & 16 deletions settingspage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,20 @@
<string>Miscellaneous</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="timeOutLabel">
<property name="text">
<string>Timeout:</string>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>127</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<item row="1" column="1">
<widget class="QSpinBox" name="timeOutSpinBox">
<property name="suffix">
<string>s</string>
Expand All @@ -108,18 +114,19 @@
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="1" column="0">
<widget class="QLabel" name="timeOutLabel">
<property name="text">
<string>Timeout:</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>127</width>
<height>20</height>
</size>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="revertUnchangedFilesBeforeCheckin">
<property name="text">
<string>Revert unchanged files before checkin (requires tfpt.exe)</string>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
Expand Down
Loading

0 comments on commit 574a2e4

Please sign in to comment.