summaryrefslogtreecommitdiffhomepage
path: root/migration/migration.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-09 20:47:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-09 20:47:47 +0200
commite4ea50f431e8efbfb572c441d00d5539db516820 (patch)
tree3134ec2c8b895fb43e3312cf665244e71e43a77e /migration/migration.cpp
parent919bbd2aad26bd73b0dfbc9243ccb7d89fdb8fb1 (diff)
migration: type aliases confuse IDE so let's not
Diffstat (limited to 'migration/migration.cpp')
-rw-r--r--migration/migration.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/migration/migration.cpp b/migration/migration.cpp
index 06cd5b93..902490f5 100644
--- a/migration/migration.cpp
+++ b/migration/migration.cpp
@@ -60,9 +60,9 @@ void migrator::register_migration(migration* m)
migrations().push_back(m);
}
-migrator::vec& migrator::migrations()
+std::vector<migration*>& migrator::migrations()
{
- static vec ret;
+ static std::vector<migration*> ret;
return ret;
}
@@ -81,7 +81,7 @@ QString migrator::last_migration_time()
QString migrator::time_after_migrations()
{
- const vec list = sorted_migrations();
+ const std::vector<migration*> list = sorted_migrations();
if (list.size() == 0u)
return QStringLiteral("19700101_00");
@@ -101,9 +101,12 @@ void migrator::set_last_migration_time(const QString& val)
s->endGroup();
}
-migrator::vec migrator::sorted_migrations()
+std::vector<migration*> migrator::sorted_migrations()
{
- vec list(migrations());
+ std::vector<migration*> list(migrations());
+
+ using mm = migration*;
+
std::sort(list.begin(), list.end(), [](const mm x, const mm y) { return x->unique_date() < y->unique_date(); });
return list;
}
@@ -118,8 +121,8 @@ int migrator::to_int(const QString& str, bool& ok)
std::vector<QString> migrator::run()
{
- vec migrations = sorted_migrations();
- vstr done;
+ std::vector<migration*> migrations = sorted_migrations();
+ std::vector<QString> done;
const QString last_migration = last_migration_time();