mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Port yuzu commit: "yuzu/CMakeLists: Disable implicit QString co… (#5074)
* yuzu/CMakeLists: Disable implicit QString conversions Now that all of our code is compilable with implicit QString conversions, we can enforce it at compile-time by disabling them. Co-Authored-By: Mat M. <lioncash@users.noreply.github.com> * citra_qt: Remove lots of implicit QString conversions Co-authored-by: Mat M. <mathew1800@gmail.com>
This commit is contained in:
		
							parent
							
								
									b53b4bfb17
								
							
						
					
					
						commit
						f106e76132
					
				
					 12 changed files with 55 additions and 41 deletions
				
			
		|  | @ -8,7 +8,7 @@ | |||
| #include "citra_qt/util/util.h" | ||||
| 
 | ||||
| QFont GetMonospaceFont() { | ||||
|     QFont font("monospace"); | ||||
|     QFont font(QStringLiteral("monospace")); | ||||
|     // Automatic fallback to a monospace font on on platforms without a font called "monospace"
 | ||||
|     font.setStyleHint(QFont::Monospace); | ||||
|     font.setFixedPitch(true); | ||||
|  | @ -18,12 +18,12 @@ QFont GetMonospaceFont() { | |||
| QString ReadableByteSize(qulonglong size) { | ||||
|     static const std::array<const char*, 6> units = {"B", "KiB", "MiB", "GiB", "TiB", "PiB"}; | ||||
|     if (size == 0) | ||||
|         return "0"; | ||||
|         return QStringLiteral("0"); | ||||
|     int digit_groups = std::min<int>(static_cast<int>(std::log10(size) / std::log10(1024)), | ||||
|                                      static_cast<int>(units.size())); | ||||
|     return QString("%L1 %2") | ||||
|     return QStringLiteral("%L1 %2") | ||||
|         .arg(size / std::pow(1024, digit_groups), 0, 'f', 1) | ||||
|         .arg(units[digit_groups]); | ||||
|         .arg(QString::fromUtf8(units[digit_groups])); | ||||
| } | ||||
| 
 | ||||
| QPixmap CreateCirclePixmapFromColor(const QColor& color) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue