@@ -1,5 +1,5 @@
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014-2016 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -47,6 +47,12 @@ void UsersModelPrivate::resetEntries()
47 resetEntries_full();
47 resetEntries_full();
50+ // Assign uids in a loop, just to avoid having to muck with them when
51+ // adding or removing test users.
52+ for (int i = 0; i < entries.size(); i++) {
53+ entries[i].uid = i + 1;
50 q->endResetModel();
56 q->endResetModel();
@@ -54,7 +60,7 @@ void UsersModelPrivate::resetEntries_single()
57− { "single", "Single User", 0, 0, false, false, 0, 0 },
63+ { "single", "Single User", 0, 0, false, false, 0, 0, 0 },
@@ -62,7 +68,7 @@ void UsersModelPrivate::resetEntries_singlePassphrase()
65− { "single", "Single User", 0, 0, false, false, 0, 0 },
71+ { "single", "Single User", 0, 0, false, false, 0, 0, 0 },
@@ -70,7 +76,7 @@ void UsersModelPrivate::resetEntries_singlePin()
73− { "has-pin", "Has PIN", 0, 0, false, false, 0, 0 },
79+ { "has-pin", "Has PIN", 0, 0, false, false, 0, 0, 0 },
@@ -78,26 +84,26 @@ void UsersModelPrivate::resetEntries_full()
81− { "has-password", "Has Password", 0, 0, false, false, 0, 0 },
87+ { "has-password", "Has Password", 0, 0, false, false, 0, 0, 0 },
82− { "has-pin", "Has PIN", 0, 0, false, false, 0, 0 },
88+ { "has-pin", "Has PIN", 0, 0, false, false, 0, 0, 0 },
83− { "different-prompt", "Different Prompt", 0, 0, false, false, 0, 0 },
89+ { "different-prompt", "Different Prompt", 0, 0, false, false, 0, 0, 0 },
84− { "no-password", "No Password", 0, 0, false, false, 0, 0 },
90+ { "no-password", "No Password", 0, 0, false, false, 0, 0, 0 },
85− { "auth-error", "Auth Error", 0, 0, false, false, 0, 0 },
91+ { "auth-error", "Auth Error", 0, 0, false, false, 0, 0, 0 },
86− { "two-factor", "Two Factor", 0, 0, false, false, 0, 0 },
92+ { "two-factor", "Two Factor", 0, 0, false, false, 0, 0, 0 },
87− { "info-prompt", "Info Prompt", 0, 0, false, false, 0, 0 },
93+ { "info-prompt", "Info Prompt", 0, 0, false, false, 0, 0, 0 },
88− { "html-info-prompt", "HTML Info Prompt", 0, 0, false, false, 0, 0 },
94+ { "html-info-prompt", "HTML Info Prompt", 0, 0, false, false, 0, 0, 0 },
89− { "long-info-prompt", "Long Info Prompt", 0, 0, false, false, 0, 0 },
95+ { "long-info-prompt", "Long Info Prompt", 0, 0, false, false, 0, 0, 0 },
90− { "wide-info-prompt", "Wide Info Prompt", 0, 0, false, false, 0, 0 },
96+ { "wide-info-prompt", "Wide Info Prompt", 0, 0, false, false, 0, 0, 0 },
91− { "multi-info-prompt", "Multi Info Prompt", 0, 0, false, false, 0, 0 },
97+ { "multi-info-prompt", "Multi Info Prompt", 0, 0, false, false, 0, 0, 0 },
92− { "long-name", "Long name (far far too long to fit)", 0, 0, false, false, 0, 0 },
98+ { "long-name", "Long name (far far too long to fit)", 0, 0, false, false, 0, 0, 0 },
93− { "color-background", "Color Background", "#dd4814", 0, false, false, 0, 0 },
99+ { "color-background", "Color Background", "#dd4814", 0, false, false, 0, 0, 0 },
94 // white and black are a bit redundant, but useful for manually testing if UI is still readable
100 // white and black are a bit redundant, but useful for manually testing if UI is still readable
95− { "white-background", "White Background", "#ffffff", 0, false, false, 0, 0 },
101+ { "white-background", "White Background", "#ffffff", 0, false, false, 0, 0, 0 },
96− { "black-background", "Black Background", "#000000", 0, false, false, 0, 0 },
102+ { "black-background", "Black Background", "#000000", 0, false, false, 0, 0, 0 },
97− { "no-background", "No Background", "", 0, false, false, 0, 0 },
103+ { "no-background", "No Background", "", 0, false, false, 0, 0, 0 },
98− { "unicode", "가나다라마", 0, 0, false, false, 0, 0 },
104+ { "unicode", "가나다라마", 0, 0, false, false, 0, 0, 0 },
99− { "no-response", "No Response", 0, 0, false, false, 0, 0 },
105+ { "no-response", "No Response", 0, 0, false, false, 0, 0, 0 },
100− { "empty-name", "", 0, 0, false, false, 0, 0 },
106+ { "empty-name", "", 0, 0, false, false, 0, 0, 0 },