| 180 | } |
| 181 | |
| 182 | QSize QTableSetupDialog::parseComboBoxTextToSize(const QString &text) |
| 183 | { |
| 184 | // Parse text like "16×16" or "32×32" to QSize |
| 185 | // Return QSize() (invalid) if parsing fails or values are not positive |
| 186 | QStringList sizeParts = text.split(ICON_SIZE_SEPARATORT); |
| 187 | if (sizeParts.size() != 2) { |
| 188 | return QSize(); // Invalid format |
| 189 | } |
| 190 | |
| 191 | bool ok1, ok2; |
| 192 | int width = sizeParts[0].toInt(&ok1); |
| 193 | int height = sizeParts[1].toInt(&ok2); |
| 194 | |
| 195 | if (ok1 && ok2 && width > 0 && height > 0) { |
| 196 | return QSize(width, height); |
| 197 | } |
| 198 | |
| 199 | return QSize(); // Invalid size |
| 200 | } |
| 201 | |
| 202 | void QTableSetupDialog::updateTrayIconPixelSizeWithCurrentText() |
| 203 | { |