Changeset View
Changeset View
Standalone View
Standalone View
src/document/katedocument.cpp
Show First 20 Lines • Show All 2187 Lines • ▼ Show 20 Line(s) | 2171 | { | |||
---|---|---|---|---|---|
2188 | 2188 | | |||
2189 | // remember error | 2189 | // remember error | ||
2190 | m_openingError = true; | 2190 | m_openingError = true; | ||
2191 | m_openingErrorMessage = i18n("The file %1 could not be loaded, as it was not possible to read from it.\n\nCheck if you have read access to this file.", this->url().toDisplayString(QUrl::PreferLocalFile)); | 2191 | m_openingErrorMessage = i18n("The file %1 could not be loaded, as it was not possible to read from it.\n\nCheck if you have read access to this file.", this->url().toDisplayString(QUrl::PreferLocalFile)); | ||
2192 | 2192 | | |||
2193 | } | 2193 | } | ||
2194 | //END: error | 2194 | //END: error | ||
2195 | 2195 | | |||
2196 | #ifdef Q_OS_ANDROID | ||||
2197 | int log2(double d) { | ||||
2198 | int result; | ||||
2199 | std::frexp(d, &result); | ||||
2200 | return result-1; | ||||
2201 | } | ||||
2202 | #endif | ||||
2196 | 2203 | | |||
2197 | void KTextEditor::DocumentPrivate::openWithLineLengthLimitOverride() | 2204 | void KTextEditor::DocumentPrivate::openWithLineLengthLimitOverride() | ||
2198 | { | 2205 | { | ||
2199 | // raise line length limit to the next power of 2 | 2206 | // raise line length limit to the next power of 2 | ||
2200 | const int longestLine = m_buffer->longestLineLoaded(); | 2207 | const int longestLine = m_buffer->longestLineLoaded(); | ||
2201 | int newLimit = pow(2, ceil(log2(longestLine))); | 2208 | int newLimit = pow(2, ceil(log2(longestLine))); | ||
2202 | if (newLimit <= longestLine) { | 2209 | if (newLimit <= longestLine) { | ||
2203 | newLimit *= 2; | 2210 | newLimit *= 2; | ||
▲ Show 20 Lines • Show All 3825 Lines • Show Last 20 Lines |