Changeset View
Changeset View
Standalone View
Standalone View
src/kcmultidialog.cpp
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 88 | { | |||
---|---|---|---|---|---|
94 | for (int i = 0; i < modules.count(); ++i) { | 94 | for (int i = 0; i < modules.count(); ++i) { | ||
95 | if (modules[i].item == previous) { | 95 | if (modules[i].item == previous) { | ||
96 | previousModule = modules[i].kcm; | 96 | previousModule = modules[i].kcm; | ||
97 | } | 97 | } | ||
98 | if (modules[i].item == current) { | 98 | if (modules[i].item == current) { | ||
99 | currentModule = modules[i].kcm; | 99 | currentModule = modules[i].kcm; | ||
100 | } | 100 | } | ||
101 | } | 101 | } | ||
102 | Q_ASSERT(currentModule); | | |||
103 | 102 | | |||
104 | // For some reason the KCModuleQml modules handle their own margin internally | 103 | // For some reason the KCModuleQml modules handle their own margin internally | ||
105 | // to match that we need to adjust the spacing of our page widget | 104 | // to match that we need to adjust the spacing of our page widget | ||
106 | // by removing the spacing between the left pane and the edge, and the layout on the right | 105 | // by removing the spacing between the left pane and the edge, and the layout on the right | ||
107 | // when we reduce the layout on the right we need to pad the buttons back to match | 106 | // when we reduce the layout on the right we need to pad the buttons back to match | ||
108 | 107 | | |||
109 | // TODO KF6 Fix this situation. | 108 | // TODO KF6 Fix this situation. | ||
110 | 109 | | |||
111 | if (currentModule->realModule() && currentModule->realModule()->inherits("KCModuleQml")) { | 110 | if (currentModule && currentModule->realModule() && currentModule->realModule()->inherits("KCModuleQml")) { | ||
112 | bool padHackLeft = false; | 111 | bool padHackLeft = false; | ||
113 | bool padHackRight = false; | 112 | bool padHackRight = false; | ||
114 | if (q->pageWidget()->model()->rowCount() < 2) { | 113 | if (q->pageWidget()->model()->rowCount() < 2) { | ||
115 | padHackLeft = true; | 114 | padHackLeft = true; | ||
116 | padHackRight = true; | 115 | padHackRight = true; | ||
117 | } else if (qApp->isRightToLeft()) { | 116 | } else if (qApp->isRightToLeft()) { | ||
118 | padHackLeft = true; | 117 | padHackLeft = true; | ||
119 | } else { | 118 | } else { | ||
▲ Show 20 Lines • Show All 480 Lines • Show Last 20 Lines |