summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <[email protected]>2017-12-29 23:07:41 -0500
committerKurt Hindenburg <[email protected]>2017-12-29 23:07:41 -0500
commit38e886007db2092b04902b3c5ccddae0c5c4c69d (patch)
tree01941e499d32e4f423097908c54316160f064872
parente5c8d97e510de401cd2ed75704a534b5932a9ed7 (diff)
Use static_cast<Profile::Property>
-rw-r--r--src/EditProfileDialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp
index 397f10b..4cc0ad5 100644
--- a/src/EditProfileDialog.cpp
+++ b/src/EditProfileDialog.cpp
@@ -742,7 +742,7 @@ void EditProfileDialog::unpreviewAll()
QHashIterator<int, QVariant> iter(_previewedProperties);
while (iter.hasNext()) {
iter.next();
- map.insert((Profile::Property)iter.key(), iter.value());
+ map.insert(static_cast<Profile::Property>(iter.key()), iter.value());
}
// undo any preview changes
@@ -760,7 +760,7 @@ void EditProfileDialog::unpreview(int aProperty)
}
QHash<Profile::Property, QVariant> map;
- map.insert((Profile::Property)aProperty, _previewedProperties[aProperty]);
+ map.insert(static_cast<Profile::Property>(aProperty), _previewedProperties[aProperty]);
ProfileManager::instance()->changeProfile(_profile, map, false);
_previewedProperties.remove(aProperty);
@@ -788,7 +788,7 @@ void EditProfileDialog::delayedPreviewActivate()
void EditProfileDialog::preview(int aProperty, const QVariant &value)
{
QHash<Profile::Property, QVariant> map;
- map.insert((Profile::Property)aProperty, value);
+ map.insert(static_cast<Profile::Property>(aProperty), value);
_delayedPreviewProperties.remove(aProperty);
@@ -800,13 +800,13 @@ void EditProfileDialog::preview(int aProperty, const QVariant &value)
// TODO - Save the original values for each profile and use to unpreview properties
ProfileGroup::Ptr group = original->asGroup();
if (group && group->profiles().count() > 1
- && original->property<QVariant>((Profile::Property)aProperty).isNull()) {
+ && original->property<QVariant>(static_cast<Profile::Property>(aProperty)).isNull()) {
return;
}
if (!_previewedProperties.contains(aProperty)) {
_previewedProperties.insert(aProperty,
- original->property<QVariant>((Profile::Property)aProperty));
+ original->property<QVariant>(static_cast<Profile::Property>(aProperty)));
}
// temporary change to color scheme