change to use auto

wilder-portage
Kurt Hindenburg 8 years ago
parent c5dc77f851
commit 5a31b4af6d
  1. 8
      src/ProfileManager.cpp
  2. 2
      src/autotests/ProfileTest.cpp

@ -181,7 +181,7 @@ Profile::Ptr ProfileManager::loadProfile(const QString& shortPath)
}
// load the profile
ProfileReader* reader = new ProfileReader();
auto reader = new ProfileReader();
Profile::Ptr newProfile = Profile::Ptr(new Profile(fallbackProfile()));
newProfile->setProperty(Profile::Path, path);
@ -209,7 +209,7 @@ Profile::Ptr ProfileManager::loadProfile(const QString& shortPath)
}
QStringList ProfileManager::availableProfilePaths() const
{
ProfileReader* reader = new ProfileReader();
auto reader = new ProfileReader();
QStringList paths;
paths += reader->findProfiles();
@ -340,7 +340,7 @@ Profile::Ptr ProfileManager::fallbackProfile() const
QString ProfileManager::saveProfile(Profile::Ptr profile)
{
ProfileWriter* writer = new ProfileWriter();
auto writer = new ProfileWriter();
QString newPath = writer->getPath(profile);
@ -514,7 +514,7 @@ void ProfileManager::setDefaultProfile(Profile::Ptr profile)
void ProfileManager::saveDefaultProfile()
{
QString path = _defaultProfile->path();
ProfileWriter* writer = new ProfileWriter();
auto writer = new ProfileWriter();
if (path.isEmpty()) {
path = writer->getPath(_defaultProfile);

@ -192,7 +192,7 @@ void ProfileTest::testProfileFileNames()
{
Profile::Ptr profile = Profile::Ptr(new Profile);
QFileInfo fileInfo;
ProfileWriter *writer = new ProfileWriter();
auto writer = new ProfileWriter();
profile->setProperty(Profile::UntranslatedName, QStringLiteral("Indiana"));
fileInfo.setFile(writer->getPath(profile));

Loading…
Cancel
Save