Changeset View
Changeset View
Standalone View
Standalone View
dialogs/kpDocumentSaveOptionsPreviewDialog.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | 107 | { | |||
---|---|---|---|---|---|
112 | 112 | | |||
113 | m_fileSize = fileSize; | 113 | m_fileSize = fileSize; | ||
114 | 114 | | |||
115 | const kpCommandSize::SizeType pixmapSize = kpCommandSize::PixmapSize (pixmap); | 115 | const kpCommandSize::SizeType pixmapSize = kpCommandSize::PixmapSize (pixmap); | ||
116 | // (int cast is safe as long as the file size is not more than 20 million | 116 | // (int cast is safe as long as the file size is not more than 20 million | ||
117 | // -- i.e. INT_MAX / 100 -- times the pixmap size) | 117 | // -- i.e. INT_MAX / 100 -- times the pixmap size) | ||
118 | const int percent = pixmapSize ? | 118 | const int percent = pixmapSize ? | ||
119 | qMax (1, | 119 | qMax (1, | ||
120 | (int) ((kpCommandSize::SizeType) fileSize * 100 / pixmapSize)) : | 120 | static_cast<int> (static_cast<kpCommandSize::SizeType> (fileSize * 100 / pixmapSize))) : | ||
121 | 0; | 121 | 0; | ||
122 | #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET | 122 | #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET | ||
123 | qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()" | 123 | qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()" | ||
124 | << " pixmapSize=" << pixmapSize | 124 | << " pixmapSize=" << pixmapSize | ||
125 | << " fileSize=" << fileSize | 125 | << " fileSize=" << fileSize | ||
126 | << " raw fileSize/pixmapSize%=" | 126 | << " raw fileSize/pixmapSize%=" | ||
127 | << (pixmapSize ? (kpCommandSize::SizeType) fileSize * 100 / pixmapSize : 0) | 127 | << (pixmapSize ? (kpCommandSize::SizeType) fileSize * 100 / pixmapSize : 0) | ||
128 | << endl; | 128 | << endl; | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |