Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

desktop; minor speed oprtimizations. Now it mostly stays in backround…

… resizing.
  • Loading branch information...
commit ee95d7c704842289378625be31777cd079dfad54 1 parent aea9994
@pvanek pvanek authored
View
21 razorqt-desktop/desktop-razor/workspacemanager.cpp
@@ -85,6 +85,7 @@ void RazorWorkSpaceManager::setup()
int numScreens = QApplication::desktop()->screenCount();
// Loop over screens
+ QString themeWallpaper;
for (int screen = 0; screen < numScreens; ++screen) {
m_config->setArrayIndex(screen);
m_config->beginReadArray("desktops");
@@ -95,7 +96,7 @@ void RazorWorkSpaceManager::setup()
break;
m_config->setArrayIndex(desktop);
- QString themeWallpaper = razorTheme.desktopBackground(desktop + 1);
+ themeWallpaper = razorTheme.desktopBackground(desktop + 1);
desktops[screen][desktop] = WorkspaceConfig (
strToBackgroundType(m_config->value("wallpaper_type", themeWallpaper.isEmpty() ? "color" : "pixmap").toString(), RazorWorkSpaceManager::BackgroundColor),
@@ -119,22 +120,22 @@ void RazorWorkSpaceManager::setup()
// Loop over screens
for (int screen = 0; screen < numScreens; ++screen) {
- QList<RazorWorkSpace*>* screenWorkspaces;
+ QList<RazorWorkSpace*> screenWorkspaces;
if (screen < m_workspaces.count()) {
// Existing screen
- screenWorkspaces = &m_workspaces[screen];
+ screenWorkspaces = m_workspaces[screen];
}
else {
// New screen
Q_ASSERT(screen == m_workspaces.count());
m_workspaces.append(QList<RazorWorkSpace*>());
- screenWorkspaces = &m_workspaces.last();
+ screenWorkspaces = m_workspaces.last();
}
// Remove additional workspaces
- int toRemove = screenWorkspaces->count() - m_desktopCount;
+ int toRemove = screenWorkspaces.count() - m_desktopCount;
for (int i = 0; i < toRemove; ++i)
- delete screenWorkspaces->takeLast();
+ delete screenWorkspaces.takeLast();
// Loop over virtual desktops
for (int desktop = 0; desktop < m_desktopCount; ++desktop) {
@@ -146,16 +147,16 @@ void RazorWorkSpaceManager::setup()
// Use existing RazorWorkSpace instance or create a new one
RazorWorkSpace * ws;
- if (desktop < screenWorkspaces->count()) {
+ if (desktop < screenWorkspaces.count()) {
// Existing workspace
- ws = screenWorkspaces->at(desktop);
+ ws = screenWorkspaces.at(desktop);
}
else {
// New workspace
- Q_ASSERT(desktop == screenWorkspaces->count());
+ Q_ASSERT(desktop == screenWorkspaces.count());
ws = new RazorWorkSpace(m_scene, screen, desktop);
connect(m_scene, SIGNAL(saveConfig()), ws, SLOT(saveConfig()));
- screenWorkspaces->append(ws);
+ screenWorkspaces.append(ws);
}
if (desktops.contains(screen) && desktops[screen].contains(desktop))
View
2  razorqt-desktop/src/main.cpp
@@ -44,7 +44,7 @@ int main (int argc, char* argv[])
RazorSettings config("desktop");
QString configId(config.value("desktop", "razor").toString());
- QString libraryFileName = QString(DESKTOP_PLUGIN_DIR) + "libdesktop-" + configId + ".so";
+ QString libraryFileName = QString("%1libdesktop-%2.so").arg(DESKTOP_PLUGIN_DIR).arg(configId);
qDebug() << "RazorDesktop: try to load " << libraryFileName;
Please sign in to comment.
Something went wrong with that request. Please try again.