Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleConfig.cpp
Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Line(s) | 187 | { | |||
---|---|---|---|---|---|
188 | mGuiConfig.writeEntry(QStringLiteral("captureDelay"), delay); | 188 | mGuiConfig.writeEntry(QStringLiteral("captureDelay"), delay); | ||
189 | mGuiConfig.sync(); | 189 | mGuiConfig.sync(); | ||
190 | } | 190 | } | ||
191 | 191 | | |||
192 | // capture mode | 192 | // capture mode | ||
193 | 193 | | |||
194 | int SpectacleConfig::captureMode() const | 194 | int SpectacleConfig::captureMode() const | ||
195 | { | 195 | { | ||
196 | return mGuiConfig.readEntry(QStringLiteral("captureModeIndex"), 0); | 196 | return std::max(0, mGuiConfig.readEntry(QStringLiteral("captureModeIndex"), 0)); | ||
197 | } | 197 | } | ||
198 | 198 | | |||
199 | void SpectacleConfig::setCaptureMode(int index) | 199 | void SpectacleConfig::setCaptureMode(int index) | ||
200 | { | 200 | { | ||
201 | mGuiConfig.writeEntry(QStringLiteral("captureModeIndex"), index); | 201 | mGuiConfig.writeEntry(QStringLiteral("captureModeIndex"), index); | ||
202 | mGuiConfig.sync(); | 202 | mGuiConfig.sync(); | ||
203 | } | 203 | } | ||
204 | 204 | | |||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |